Bug #1644

C++ converters do not build on windows

Added by J. Wienke almost 8 years ago. Updated almost 8 years ago.

Status:ResolvedStart date:10/07/2013
Priority:HighDue date:
Assignee:J. Wienke% Done:

100%

Category:cpp
Target version:Robotics Service Bus - rsb-0.10

Description

C:/Program Files/Microsoft SDKs/Windows/v7.0A/bin/RC.Exe /fo..\build\rstconverters0.10.dll.embed.manifest.res ..\build\rstconverters0.10.dll.resource.txt 
LINK Pass 1:
C:\PROGRA~1\MICROS~2.0\VC\bin\link.exe /nologo @CMakeFiles\rstconverters0.10.dir\objects1.rsp /out:..\build\rstconverters0.10.dll /implib:..\build\rstconverters0.10.lib /pdb:C:\jenkins\workspace\rst-converters-cpp-trunk-windows\VS_VERSION\100\label\Windows_7_32bit\cpp\build\build\rstconverters0.10.pdb /dll /version:0.10 /STACK:10000000 /machine:X86 /debug /INCREMENTAL c:\jenkins\workspace\rst-converters-cpp-trunk-windows\VS_VERSION\100\label\Windows_7_32bit\upstream\RSB\lib\rsb.lib c:\jenkins\workspace\rst-converters-cpp-trunk-windows\VS_VERSION\100\label\Windows_7_32bit\upstream\RST\lib\rst0.10.lib c:\jenkins\workspace\rst-converters-cpp-trunk-windows\VS_VERSION\100\label\Windows_7_32bit\upstream\RST\lib\rstsandbox0.10.lib c:\jenkins\workspace\rst-converters-cpp-trunk-windows\VS_VERSION\100\label\Windows_7_32bit\upstream\RSC\lib\rsc0.10.lib c:\vol\msvc100\boost\lib\boost_thread-vc100-mt-gd-1_54.lib c:\vol\msvc100\boost\lib\boost_filesystem-vc100-mt-gd-1_54.lib c:\vol\msvc100\boost\lib\boost_signals-vc100-mt-gd-1_54.lib c:\vol\msvc100\boost\lib\boost_date_time-vc100-mt-gd-1_54.lib c:\vol\msvc100\boost\lib\boost_program_options-vc100-mt-gd-1_54.lib c:\vol\msvc100\boost\lib\boost_system-vc100-mt-gd-1_54.lib c:\vol\msvc100\boost\lib\boost_regex-vc100-mt-gd-1_54.lib c:\vol\msvc100\boost\lib\boost_chrono-vc100-mt-gd-1_54.lib wsock32.lib c:\jenkins\workspace\rst-converters-cpp-trunk-windows\VS_VERSION\100\label\Windows_7_32bit\upstream\RST\lib\rst0.10.lib c:\vol\msvc100\protobuf\bin\libprotobuf.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:..\build\rstconverters0.10.dll.intermediate.manifest ..\build\rstconverters0.10.dll.embed.manifest.res 
   Bibliothek "..\build\rstconverters0.10.lib" und Objekt "..\build\rstconverters0.10.exp" werden erstellt.

TransformationPoseConverter.cpp.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) const rst::converters::boost::TransformationPoseConverter::`vftable'" (__imp_??_7TransformationPoseConverter@boost@converters@rst@@6B@)" in Funktion ""public: __thiscall rst::converters::boost::TransformationPoseConverter::TransformationPoseConverter(void)" (??0TransformationPoseConverter@boost@converters@rst@@QAE@XZ)".

TwoDPoseConverter.cpp.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) const rst::converters::boost::TwoDPoseConverter::`vftable'" (__imp_??_7TwoDPoseConverter@boost@converters@rst@@6B@)" in Funktion ""public: __thiscall rst::converters::boost::TwoDPoseConverter::TwoDPoseConverter(void)" (??0TwoDPoseConverter@boost@converters@rst@@QAE@XZ)".

..\build\rstconverters0.10.dll : fatal error LNK1120: 2 nicht aufgelöste externe Verweise.

I have no idea what's wrong here. All symbols seem to be correctly implemented, the whole dependency chain uses multi-threaded and debug runtime libraries etc.

Associated revisions

Revision 759bb797
Added by J. Wienke almost 8 years ago

Fix windows dll export symbol

Since the version is encoded in the library name now, it also contains a
dot character. For generating the preprocessor symbol used to detect
whether dll symbols need to be exported or imported, CMake replaces
dots with underscores. We also need to follow this convention when
detecting this symbol. Otherwise it will never be defined.

refs #1644

Revision d385a54b
Added by J. Wienke almost 8 years ago

Fix windows dll export symbol

Since the version is encoded in the library name now, it also contains a
dot character. For generating the preprocessor symbol used to detect
whether dll symbols need to be exported or imported, CMake replaces
dots with underscores. We also need to follow this convention when
detecting this symbol. Otherwise it will never be defined.

refs #1644

Revision bdbf7ef3
Added by J. Wienke about 5 years ago

Fix windows dll export symbol

Since the version is encoded in the library name now, it also contains a
dot character. For generating the preprocessor symbol used to detect
whether dll symbols need to be exported or imported, CMake replaces
dots with underscores. We also need to follow this convention when
detecting this symbol. Otherwise it will never be defined.

refs #1644

History

#1 Updated by J. Moringen almost 8 years ago

  • Assignee set to J. Wienke

#2 Updated by J. Moringen almost 8 years ago

  • Priority changed from Normal to High

#3 Updated by J. Moringen almost 8 years ago

  • Subject changed from converters cpp do not build on windows to C++ converters do not build on windows

#4 Updated by J. Wienke almost 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

This was caused by the commit that added the version to the library name. The version contains a dot, which is not a valid preprocessor symbol. So CMake replaces the dot with an underscore when defining a preprocessor symbol while building the library to detect whether dllsymbols need to be exported or not. We have to follow that underscore convention when detecting that symbol in the exports file.

Also available in: Atom PDF