Bug #1241
Linking against rst-converters fails on Win7
Status: | Resolved | Start date: | 11/17/2012 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Wienke | % Done: | 100% | |
Category: | cpp | |||
Target version: | Robotics Service Bus - rsb-0.7 |
Description
I didn't find the rst-converter-Project so I post the issue here.
When I compile against rst-converters and use rst::converters::opencv::IplImageConverter::IplImageDeleter() I get a linking error.
class __declspec(dllexport) is missing for the class IplImageDeleter (I've fixed it locally, but it's better to fix it for others too).
Associated revisions
Added RST_CONVERTERS_EXPORT in cpp/CMakeLists.txt, */.h
refs #1241
The project was missing __declspec(dllimport) declarations for classes
and this produced an unused dll in Windows.
- cpp/CMakeLists.txt: define RST_CONVERTERS_EXPORT with
__declspec(dllimport) on Windows - cpp/src/rst/converters/boost/TransformationPoseConverter.h: added
RST_CONVERTERS_EXPORT to class definitions - cpp/src/rst/converters/boost/TwoDPoseConverter.h: likewise
- cpp/src/rst/converters/naoqi/ALImageConverter.h: likewise
- cpp/src/rst/converters/opencv/IplImageConverter.h: likewise
- cpp/src/rst/converters/rci/JointAnglesConverter.h: likewise
- cpp/src/rst/converters/rci/JointImpedanceConverter.h: likewise
- cpp/src/rst/converters/rci/JointTorquesConverter.h: likewise
- cpp/src/rst/converters/rci/LengthConverter.h: likewise
- cpp/src/rst/converters/rci/PhaseConverter.h: likewise
- cpp/src/rst/converters/rci/PoseConverter.h: likewise
- cpp/src/rst/converters/rci/PressureConverter.h: likewise
- cpp/src/rst/converters/rci/TranslationConverter.h: likewise
- cpp/src/rst/converters/surfimageconverter/SurfImageConverter.h: likewise
Backport: Added RST_CONVERTERS_EXPORT in cpp/CMakeLists.txt, */.h
fixes #1241
The project was missing __declspec(dllimport) declarations for classes
and this produced an unused dll in Windows.
- cpp/CMakeLists.txt: define RST_CONVERTERS_EXPORT with
__declspec(dllimport) on Windows - cpp/src/rst/converters/boost/TransformationPoseConverter.h: added
RST_CONVERTERS_EXPORT to class definitions - cpp/src/rst/converters/boost/TwoDPoseConverter.h: likewise
- cpp/src/rst/converters/naoqi/ALImageConverter.h: likewise
- cpp/src/rst/converters/opencv/IplImageConverter.h: likewise
- cpp/src/rst/converters/rci/JointAnglesConverter.h: likewise
- cpp/src/rst/converters/rci/JointImpedanceConverter.h: likewise
- cpp/src/rst/converters/rci/JointTorquesConverter.h: likewise
- cpp/src/rst/converters/rci/LengthConverter.h: likewise
- cpp/src/rst/converters/rci/PhaseConverter.h: likewise
- cpp/src/rst/converters/rci/PoseConverter.h: likewise
- cpp/src/rst/converters/rci/PressureConverter.h: likewise
- cpp/src/rst/converters/rci/TranslationConverter.h: likewise
- cpp/src/rst/converters/surfimageconverter/SurfImageConverter.h: likewise
Backport: Added RST_CONVERTERS_EXPORT in cpp/CMakeLists.txt, */.h
fixes #1241
The project was missing __declspec(dll{import,export}) declarations
for classes and this produced an unused dll in Windows.
- cpp/src/CMakeLists.txt: configure file and install file
rstconvertersexorts.h - cpp/src/rst/rstconvertersexports.h.in: new file; is configured to
produce appropriate value of RST_CONVERTERS_EXPORT - cpp/src/rst/converters/boost/TransformationPoseConverter.h: include
rstconvertersexports.h; add RST_CONVERTERS_EXPORT to class
definitions - cpp/src/rst/converters/boost/TwoDPoseConverter.h: likewise
- cpp/src/rst/converters/naoqi/ALImageConverter.h: likewise
- cpp/src/rst/converters/opencv/IplImageConverter.h: likewise
- cpp/src/rst/converters/rci/JointAnglesConverter.h: likewise
- cpp/src/rst/converters/rci/JointImpedanceConverter.h: likewise
- cpp/src/rst/converters/rci/JointTorquesConverter.h: likewise
- cpp/src/rst/converters/rci/LengthConverter.h: likewise
- cpp/src/rst/converters/rci/PhaseConverter.h: likewise
- cpp/src/rst/converters/rci/PoseConverter.h: likewise
- cpp/src/rst/converters/rci/PressureConverter.h: likewise
- cpp/src/rst/converters/rci/TranslationConverter.h: likewise
- cpp/src/rst/converters/surfimageconverter/SurfImageConverter.h:
likewise
Added RST_CONVERTERS_EXPORT in cpp/CMakeLists.txt, */.h
refs #1241
The project was missing __declspec(dll{import,export}) declarations
for classes and this produced an unused dll in Windows.
- cpp/src/CMakeLists.txt: configure file and install file
rstconvertersexorts.h - cpp/src/rst/rstconvertersexports.h.in: new file; is configured to
produce appropriate value of RST_CONVERTERS_EXPORT - cpp/src/rst/converters/boost/TransformationPoseConverter.h: include
rstconvertersexports.h; add RST_CONVERTERS_EXPORT to class
definitions - cpp/src/rst/converters/boost/TwoDPoseConverter.h: likewise
- cpp/src/rst/converters/naoqi/ALImageConverter.h: likewise
- cpp/src/rst/converters/opencv/IplImageConverter.h: likewise
- cpp/src/rst/converters/rci/JointAnglesConverter.h: likewise
- cpp/src/rst/converters/rci/JointImpedanceConverter.h: likewise
- cpp/src/rst/converters/rci/JointTorquesConverter.h: likewise
- cpp/src/rst/converters/rci/LengthConverter.h: likewise
- cpp/src/rst/converters/rci/PhaseConverter.h: likewise
- cpp/src/rst/converters/rci/PoseConverter.h: likewise
- cpp/src/rst/converters/rci/PressureConverter.h: likewise
- cpp/src/rst/converters/rci/TranslationConverter.h: likewise
- cpp/src/rst/converters/surfimageconverter/SurfImageConverter.h:
likewise
Added RST_CONVERTERS_EXPORT in cpp/CMakeLists.txt, */.h
refs #1241
The project was missing __declspec(dll{import,export}) declarations
for classes and this produced an unused dll in Windows.
- cpp/src/CMakeLists.txt: configure file and install file
rstconvertersexorts.h - cpp/src/rst/rstconvertersexports.h.in: new file; is configured to
produce appropriate value of RST_CONVERTERS_EXPORT - cpp/src/rst/converters/boost/TransformationPoseConverter.h: include
rstconvertersexports.h; add RST_CONVERTERS_EXPORT to class
definitions - cpp/src/rst/converters/boost/TwoDPoseConverter.h: likewise
- cpp/src/rst/converters/naoqi/ALImageConverter.h: likewise
- cpp/src/rst/converters/opencv/IplImageConverter.h: likewise
- cpp/src/rst/converters/rci/JointAnglesConverter.h: likewise
- cpp/src/rst/converters/rci/JointImpedanceConverter.h: likewise
- cpp/src/rst/converters/rci/JointTorquesConverter.h: likewise
- cpp/src/rst/converters/rci/LengthConverter.h: likewise
- cpp/src/rst/converters/rci/PhaseConverter.h: likewise
- cpp/src/rst/converters/rci/PoseConverter.h: likewise
- cpp/src/rst/converters/rci/PressureConverter.h: likewise
- cpp/src/rst/converters/rci/TranslationConverter.h: likewise
- cpp/src/rst/converters/surfimageconverter/SurfImageConverter.h:
likewise
Added RST_CONVERTERS_EXPORT in cpp/CMakeLists.txt, */.h
refs #1241
The project was missing __declspec(dll{import,export}) declarations
for classes and this produced an unused dll in Windows.
- cpp/src/CMakeLists.txt: configure file and install file
rstconvertersexorts.h - cpp/src/rst/rstconvertersexports.h.in: new file; is configured to
produce appropriate value of RST_CONVERTERS_EXPORT - cpp/src/rst/converters/boost/TransformationPoseConverter.h: include
rstconvertersexports.h; add RST_CONVERTERS_EXPORT to class
definitions - cpp/src/rst/converters/boost/TwoDPoseConverter.h: likewise
- cpp/src/rst/converters/naoqi/ALImageConverter.h: likewise
- cpp/src/rst/converters/opencv/IplImageConverter.h: likewise
- cpp/src/rst/converters/rci/JointAnglesConverter.h: likewise
- cpp/src/rst/converters/rci/JointImpedanceConverter.h: likewise
- cpp/src/rst/converters/rci/JointTorquesConverter.h: likewise
- cpp/src/rst/converters/rci/LengthConverter.h: likewise
- cpp/src/rst/converters/rci/PhaseConverter.h: likewise
- cpp/src/rst/converters/rci/PoseConverter.h: likewise
- cpp/src/rst/converters/rci/PressureConverter.h: likewise
- cpp/src/rst/converters/rci/TranslationConverter.h: likewise
- cpp/src/rst/converters/surfimageconverter/SurfImageConverter.h:
likewise
Add a windows build batch file.
refs #1241
Add a windows build batch file.
refs #1241
Add a windows build batch file.
refs #1241
Avoid compilation errors on windows.
The preprocessor does not like symbols with a minus character in their name. Therefore:- CMakeListst.txt:
- rename rst-converters to rstconverters to avoid minus character
- add a warning if still a minus characters is found which could be induced through the customization option
- src/rst/rstconvertersexports.h.in: Use #pragma once instead of old include guards
refs #1241
Avoid compilation errors on windows.
The preprocessor does not like symbols with a minus character in their name. Therefore:- CMakeListst.txt:
- rename rst-converters to rstconverters to avoid minus character
- add a warning if still a minus characters is found which could be induced through the customization option
- src/rst/rstconvertersexports.h.in: Use #pragma once instead of old include guards
refs #1241
Avoid compilation errors on windows.
The preprocessor does not like symbols with a minus character in their name. Therefore:- CMakeListst.txt:
- rename rst-converters to rstconverters to avoid minus character
- add a warning if still a minus characters is found which could be induced through the customization option
- src/rst/rstconvertersexports.h.in: Use #pragma once instead of old include guards
refs #1241
Properly include time for windows.
refs #1241
Properly include time for windows.
refs #1241
Properly include time for windows.
refs #1241
Backport: Add a windows build batch file.
refs #1241
Backport: Avoid compilation errors on windows.
The preprocessor does not like symbols with a minus character in their name. Therefore:- CMakeListst.txt:
- rename rst-converters to rstconverters to avoid minus character
- add a warning if still a minus characters is found which could be induced through the customization option
- src/rst/rstconvertersexports.h.in: Use #pragma once instead of old include guards
refs #1241
Backport: Properly include time for windows.
refs #1241
History
#1 Updated by J. Moringen over 11 years ago
- Project changed from Robotics Service Bus to Robotics Systems Types
- Category set to cpp
- Status changed from New to In Progress
- Assignee set to J. Moringen
- Target version set to rsb-0.7
#2 Updated by J. Moringen over 11 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset rst-converters|commit:1810f6152cb4dba586ea733bd100a9c80eaf0538.
#3 Updated by J. Moringen over 11 years ago
I tried to solve this without actually testing on Windows. Reopen, if the problem persists.
#4 Updated by J. Moringen over 11 years ago
- Status changed from Resolved to In Progress
I don't think, the fix is correct. I will try to correct it later.
#5 Updated by J. Moringen over 11 years ago
- Status changed from In Progress to Resolved
Applied in changeset rst-converters|commit:15c777819c4440939ef37187452e33c7d7e74f9c.
#6 Updated by J. Moringen over 11 years ago
@Viktor: did you try the fix?
#7 Updated by V. Losing over 11 years ago
Yes i tried it, but i can't even compile the converters anymore. Seems there is a problem with the macro rst_converters_export.... that's the compiler message i get:
2>C:\test\Building\debug\myconverters2\cpp\build\src\rst/rstconvertersexports.h(34): error C2004: expected 'defined(id)' 2>C:\test\Building\debug\myconverters2\cpp\build\src\rst/rstconvertersexports.h(34): fatal error C1012: unmatched parenthesis : missing ')' 2> TransformationPoseConverter.cpp 2>C:\test\Building\debug\myconverters2\cpp\build\src\rst/rstconvertersexports.h(34): error C2004: expected 'defined(id)' 2>C:\test\Building\debug\myconverters2\cpp\build\src\rst/rstconvertersexports.h(34): fatal error C1012: unmatched parenthesis : missing ')' 2> TwoDPoseConverter.cpp 2>C:\test\Building\debug\myconverters2\cpp\build\src\rst/rstconvertersexports.h(34): error C2004: expected 'defined(id)' 2>C:\test\Building\debug\myconverters2\cpp\build\src\rst/rstconvertersexports.h(34): fatal error C1012: unmatched parenthesis : missing ')' 2> Generating Code...
#8 Updated by J. Moringen over 11 years ago
- Status changed from Resolved to In Progress
- Assignee deleted (
J. Moringen)
@Johannes: can you have a look? I don't have the patience for this stuff.
#9 Updated by J. Wienke over 11 years ago
@Jan: From a rough look I don't see a problem. However, can you first fix the trunk build so that I have a basis for further testing? ;) On Linux it is broken, too due to plugin changes.
#10 Updated by J. Moringen over 11 years ago
rst-converters-trunk builds again
#11 Updated by V. Losing over 11 years ago
could you please fix it in the isy-project repository too ?
https://isyprojects.techfak.uni-bielefeld.de/isy-svn/rst/rst-converters
#12 Updated by J. Wienke over 11 years ago
In the end we can generate a patch, which will be easy to apply to the rst-converters there.
#13 Updated by J. Wienke over 11 years ago
- Assignee set to J. Wienke
#14 Updated by J. Wienke over 11 years ago
- % Done changed from 100 to 60
Ok, after some upstream fixes we now have a job on the CI server (for trunk though) to reproduce the problem. Now we can work on a fix in a reliable way.
#15 Updated by J. Wienke over 11 years ago
So, the error does not appear if I change the libraryname from rst-converters
to rstconverters
. Any minus in the name results in the visible error. It seems that windows doesn't like minus characters in preprocessor symbol names and sometimes interprets them as a mathematical operator. Hence, we need to change the library name, which is not so nice, because for the 0.7 release it changes the external interface of the library.
@Jan: Should I add a logic which removes the - only on windows for 0.7 to preserve the interface?
#16 Updated by J. Wienke over 11 years ago
- % Done changed from 60 to 80
Viktor, I have backported the changes to the official 0.7 branch of rst-converters. Can you please once test whether this works now for you? If so, I will port these changes also to the ISY branch.
#17 Updated by V. Losing over 11 years ago
Works for me now. Good job!
#18 Updated by J. Wienke over 11 years ago
- % Done changed from 80 to 90
Great, I have merged the changes to the isy SVN version. Can your try this once again. Afterwards, I can close this issue.
#19 Updated by J. Wienke over 11 years ago
ping
#20 Updated by V. Losing over 11 years ago
Works there, too :D
#21 Updated by J. Wienke over 11 years ago
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100