Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[windows-2019@Release@conda] CI failure #44

Closed
traversaro opened this issue Aug 21, 2023 · 8 comments · Fixed by #46
Closed

[windows-2019@Release@conda] CI failure #44

traversaro opened this issue Aug 21, 2023 · 8 comments · Fixed by #46

Comments

@traversaro
Copy link
Member

No description provided.

@traversaro
Copy link
Member Author

The error is:

2023-08-18T08:38:39.9275866Z   xsvector3.c
2023-08-18T08:38:39.9276256Z   xsversion.c
2023-08-18T08:38:39.9276661Z   Generating Code...
2023-08-18T08:38:39.9277357Z   xstypes.vcxproj -> D:\a\yarp-device-xsensmt\yarp-device-xsensmt\build\extern\Release\xstypes.lib
2023-08-18T08:38:39.9278270Z   Building Custom Rule D:/a/yarp-device-xsensmt/yarp-device-xsensmt/extern/CMakeLists.txt
2023-08-18T08:38:39.9279278Z cl : command line warning D9002: ignoring unknown option '-include' [D:\a\yarp-device-xsensmt\yarp-device-xsensmt\build\extern\xscommon.vcxproj]
2023-08-18T08:38:39.9280947Z cl : command line warning D9002: ignoring unknown option '-include' [D:\a\yarp-device-xsensmt\yarp-device-xsensmt\build\extern\xscommon.vcxproj]
2023-08-18T08:38:39.9281665Z   xscommon_config.h
2023-08-18T08:38:39.9282521Z c1xx : fatal error C1083: Cannot open source file: 'xscommon_config.h': No such file or directory [D:\a\yarp-device-xsensmt\yarp-device-xsensmt\build\extern\xscommon.vcxproj]
2023-08-18T08:38:39.9283261Z   xsens_compat.h
2023-08-18T08:38:39.9284105Z c1xx : fatal error C1083: Cannot open source file: 'xstypes/xsens_compat.h': No such file or directory [D:\a\yarp-device-xsensmt\yarp-device-xsensmt\build\extern\xscommon.vcxproj]
2023-08-18T08:38:39.9284916Z   additionalloggerbase.cpp
2023-08-18T08:38:39.9285386Z   consolelogger.cpp
2023-08-18T08:38:39.9285836Z   enumexpandersbase.cpp
2023-08-18T08:38:40.4216272Z   journalexception.cpp
2023-08-18T08:38:41.3929757Z   journalfile.cpp
2023-08-18T08:38:42.1099281Z   journaller.cpp
2023-08-18T08:38:42.9615081Z D:\a\yarp-device-xsensmt\yarp-device-xsensmt\extern\xspublic\xscommon\journaller.cpp(199,9): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\a\yarp-device-xsensmt\yarp-device-xsensmt\build\extern\xscommon.vcxproj]
2023-08-18T08:38:42.9617594Z D:\a\yarp-device-xsensmt\yarp-device-xsensmt\extern\xspublic\xscommon\journaller.cpp(216,5): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\a\yarp-device-xsensmt\yarp-device-xsensmt\build\extern\xscommon.vcxproj]
2023-08-18T08:38:43.2369772Z   journalthreader.cpp
2023-08-18T08:38:44.0838968Z   stackdumper.cpp
2023-08-18T08:38:44.7486722Z   stackwalker.cpp
2023-08-18T08:38:45.3324281Z   stackwalker_linux.cpp
2023-08-18T08:38:45.5628494Z   threading.cpp
2023-08-18T08:38:46.3871068Z   xprintf.cpp
2023-08-18T08:38:46.6426199Z   xsens_math_throw.cpp
2023-08-18T08:38:47.5664583Z   xsens_threadpool.cpp
2023-08-18T08:38:48.7166826Z   Generating Code...
2023-08-18T08:38:51.0112152Z ##[error]Process completed with exit code 1.
2023-08-18T08:38:51.0328173Z Post job cleanup.
2023-08-18T08:38:57.4663146Z [command]"C:\Program Files\Git\bin\git.exe" version

@traversaro
Copy link
Member Author

The CI has been disable for a long time, so this could be a regression in on of the recent PRs.

@traversaro
Copy link
Member Author

@HosameldinMohamed did you remember why we added the lines:

target_compile_options(xscommon PRIVATE "SHELL:-include xscommon_config.h" "SHELL:-include xstypes/xsens_compat.h")

?

I could not find anything in the PR and issue.

@traversaro
Copy link
Member Author

@HosameldinMohamed did you remember why we added the lines:

target_compile_options(xscommon PRIVATE "SHELL:-include xscommon_config.h" "SHELL:-include xstypes/xsens_compat.h")

?

I could not find anything in the PR and issue.

Ok, I found the problem: the XSens's code uses JLDEBUGG macro without including the appropriate files. By using the /FI option, I am able to obtain the same behavior on MSVC.

@traversaro
Copy link
Member Author

Now I have some linking errors:

[1/2] Linking CXX executable xsensmt\yarp-xsensmt-example.exe
FAILED: xsensmt/yarp-xsensmt-example.exe
cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=xsensmt\CMakeFiles\yarp-xsensmt-example.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~3\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo xsensmt\CMakeFiles\yarp-xsensmt-example.dir\exampleScanDevicesAndReceiveData.cpp.obj  /out:xsensmt\yarp-xsensmt-example.exe /implib:xsensmt\yarp-xsensmt-example.lib /pdb:xsensmt\yarp-xsensmt-example.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console  extern\xscontroller.lib  extern\xscommon.lib  extern\xstypes.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~2\MICROS~3\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo xsensmt\CMakeFiles\yarp-xsensmt-example.dir\exampleScanDevicesAndReceiveData.cpp.obj /out:xsensmt\yarp-xsensmt-example.exe /implib:xsensmt\yarp-xsensmt-example.lib /pdb:xsensmt\yarp-xsensmt-example.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console extern\xscontroller.lib extern\xscommon.lib extern\xstypes.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:xsensmt\CMakeFiles\yarp-xsensmt-example.dir/intermediate.manifest xsensmt\CMakeFiles\yarp-xsensmt-example.dir/manifest.res" failed (exit code 1120) with the following output:
exampleScanDevicesAndReceiveData.cpp.obj : error LNK2019: unresolved external symbol __imp_XsScanner_scanPorts referenced in function "public: static struct XsPortInfoArray __cdecl XsScanner::scanPorts(enum XsBaudRate,int,bool,bool)" (?scanPorts@XsScanner@@SA?AUXsPortInfoArray@@W4XsBaudRate@@H_N1@Z)
xscontroller.lib(deviceredetector.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsScanner_scanPorts
xscontroller.lib(xscontrol_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_g_xsDevicePtrArrayDescriptor referenced in function "public: __cdecl XsArrayImpl<struct XsDevice *,&struct XsArrayDescriptor const g_xsDevicePtrArrayDescriptor,struct XsDevicePtrArray>::XsArrayImpl<struct XsDevice *,&struct XsArrayDescriptor const g_xsDevicePtrArrayDescriptor,struct XsDevicePtrArray>(unsigned __int64,struct XsDevice * const *)" (??0?$XsArrayImpl@PEAUXsDevice@@$1?g_xsDevicePtrArrayDescriptor@@3UXsArrayDescriptor@@BUXsDevicePtrArray@@@@QEAA@_KPEBQEAUXsDevice@@@Z)
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2001: unresolved external symbol __imp_g_xsDevicePtrArrayDescriptor
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_assign referenced in function "public: __cdecl XsDeviceConfiguration::XsDeviceConfiguration(unsigned short)" (??0XsDeviceConfiguration@@QEAA@G@Z)
xscontroller.lib(mtbfilecommunicator.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_assign
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_destruct referenced in function "public: __cdecl XsDeviceConfiguration::~XsDeviceConfiguration(void)" (??1XsDeviceConfiguration@@QEAA@XZ)
xscontroller.lib(mtbfilecommunicator.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_destruct
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_copy referenced in function "public: __cdecl XsDeviceConfiguration::XsDeviceConfiguration(struct XsDeviceConfiguration const &)" (??0XsDeviceConfiguration@@QEAA@AEBU0@@Z)
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_readFromMessage referenced in function "public: void __cdecl XsDeviceConfiguration::readFromMessage(struct XsMessage const &)" (?readFromMessage@XsDeviceConfiguration@@QEAAXAEBUXsMessage@@@Z)
xscontroller.lib(mtbfilecommunicator.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_readFromMessage
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_writeToMessage referenced in function "public: void __cdecl XsDeviceConfiguration::writeToMessage(struct XsMessage &)const " (?writeToMessage@XsDeviceConfiguration@@QEBAXAEAUXsMessage@@@Z)
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_findDevice referenced in function "public: struct XsMtDeviceConfiguration const & __cdecl XsDeviceConfiguration::deviceInfo(struct XsDeviceId const &)const " (?deviceInfo@XsDeviceConfiguration@@QEBAAEBUXsMtDeviceConfiguration@@AEBUXsDeviceId@@@Z)
xscontroller.lib(mtdevice.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_findDevice
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsUsbHubInfo_construct referenced in function "public: __cdecl XsUsbHubInfo::XsUsbHubInfo(struct XsUsbHubInfo const &)" (??0XsUsbHubInfo@@QEAA@AEBU0@@Z)
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsUsbHubInfo_destruct referenced in function "public: __cdecl XsUsbHubInfo::~XsUsbHubInfo(void)" (??1XsUsbHubInfo@@QEAA@XZ)
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsUsbHubInfo_parentPathMatches referenced in function "public: bool __cdecl XsUsbHubInfo::parentPathMatches(struct XsUsbHubInfo const &)const " (?parentPathMatches@XsUsbHubInfo@@QEBA_NAEBU1@@Z)
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_scanUsbHub referenced in function "public: static struct XsUsbHubInfo __cdecl XsScanner::scanUsbHub(struct XsPortInfo const &)" (?scanUsbHub@XsScanner@@SA?AUXsUsbHubInfo@@AEBUXsPortInfo@@@Z)
xscontroller.lib(deviceredetector.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_scanPort referenced in function "public: static bool __cdecl XsScanner::scanPort(struct XsPortInfo &,enum XsBaudRate,int,bool)" (?scanPort@XsScanner@@SA_NAEAUXsPortInfo@@W4XsBaudRate@@H_N@Z)
xscontroller.lib(deviceredetector.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_enumerateSerialPorts referenced in function "public: static struct XsPortInfoArray __cdecl XsScanner::enumerateSerialPorts(bool)" (?enumerateSerialPorts@XsScanner@@SA?AUXsPortInfoArray@@_N@Z)
xsensmt\yarp-xsensmt-example.exe : fatal error LNK1120: 14 unresolved externals
[2/2] Linking CXX shared module lib\yarp\xsensmt.dll
FAILED: lib/yarp/xsensmt.dll
cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_dll --intdir=xsensmt\CMakeFiles\xsensmt.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~3\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo xsensmt\CMakeFiles\xsensmt.dir\XsensMT.cpp.obj xsensmt\CMakeFiles\xsensmt.dir\yarp_plugin_xsensmt.cpp.obj  /out:lib\yarp\xsensmt.dll /implib:xsensmt\xsensmt.lib /pdb:lib\yarp\xsensmt.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL  C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_dev.lib  C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_math.lib  C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_sig.lib  C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_os.lib  extern\xscontroller.lib  extern\xscommon.lib  extern\xstypes.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
LINK Pass 1: command "C:\PROGRA~2\MICROS~3\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo xsensmt\CMakeFiles\xsensmt.dir\XsensMT.cpp.obj xsensmt\CMakeFiles\xsensmt.dir\yarp_plugin_xsensmt.cpp.obj /out:lib\yarp\xsensmt.dll /implib:xsensmt\xsensmt.lib /pdb:lib\yarp\xsensmt.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_dev.lib C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_math.lib C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_sig.lib C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_os.lib extern\xscontroller.lib extern\xscommon.lib extern\xstypes.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:xsensmt\CMakeFiles\xsensmt.dir/intermediate.manifest xsensmt\CMakeFiles\xsensmt.dir/manifest.res" failed (exit code 1120) with the following output:
   Creating library xsensmt\xsensmt.lib and object xsensmt\xsensmt.exp
xscontroller.lib(xscontrol_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_g_xsDevicePtrArrayDescriptor referenced in function "public: __cdecl XsArrayImpl<struct XsDevice *,&struct XsArrayDescriptor const g_xsDevicePtrArrayDescriptor,struct XsDevicePtrArray>::XsArrayImpl<struct XsDevice *,&struct XsArrayDescriptor const g_xsDevicePtrArrayDescriptor,struct XsDevicePtrArray>(unsigned __int64,struct XsDevice * const *)" (??0?$XsArrayImpl@PEAUXsDevice@@$1?g_xsDevicePtrArrayDescriptor@@3UXsArrayDescriptor@@BUXsDevicePtrArray@@@@QEAA@_KPEBQEAUXsDevice@@@Z)
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2001: unresolved external symbol __imp_g_xsDevicePtrArrayDescriptor
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_assign referenced in function "public: __cdecl XsDeviceConfiguration::XsDeviceConfiguration(unsigned short)" (??0XsDeviceConfiguration@@QEAA@G@Z)
xscontroller.lib(mtbfilecommunicator.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_assign
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_destruct referenced in function "public: __cdecl XsDeviceConfiguration::~XsDeviceConfiguration(void)" (??1XsDeviceConfiguration@@QEAA@XZ)
xscontroller.lib(mtbfilecommunicator.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_destruct
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_copy referenced in function "public: __cdecl XsDeviceConfiguration::XsDeviceConfiguration(struct XsDeviceConfiguration const &)" (??0XsDeviceConfiguration@@QEAA@AEBU0@@Z)
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_readFromMessage referenced in function "public: void __cdecl XsDeviceConfiguration::readFromMessage(struct XsMessage const &)" (?readFromMessage@XsDeviceConfiguration@@QEAAXAEBUXsMessage@@@Z)
xscontroller.lib(mtbfilecommunicator.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_readFromMessage
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_writeToMessage referenced in function "public: void __cdecl XsDeviceConfiguration::writeToMessage(struct XsMessage &)const " (?writeToMessage@XsDeviceConfiguration@@QEBAXAEAUXsMessage@@@Z)
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_findDevice referenced in function "public: struct XsMtDeviceConfiguration const & __cdecl XsDeviceConfiguration::deviceInfo(struct XsDeviceId const &)const " (?deviceInfo@XsDeviceConfiguration@@QEBAAEBUXsMtDeviceConfiguration@@AEBUXsDeviceId@@@Z)
xscontroller.lib(mtdevice.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_findDevice
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsUsbHubInfo_construct referenced in function "public: __cdecl XsUsbHubInfo::XsUsbHubInfo(struct XsUsbHubInfo const &)" (??0XsUsbHubInfo@@QEAA@AEBU0@@Z)
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsUsbHubInfo_destruct referenced in function "public: __cdecl XsUsbHubInfo::~XsUsbHubInfo(void)" (??1XsUsbHubInfo@@QEAA@XZ)
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsUsbHubInfo_parentPathMatches referenced in function "public: bool __cdecl XsUsbHubInfo::parentPathMatches(struct XsUsbHubInfo const &)const " (?parentPathMatches@XsUsbHubInfo@@QEBA_NAEBU1@@Z)
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_scanUsbHub referenced in function "public: static struct XsUsbHubInfo __cdecl XsScanner::scanUsbHub(struct XsPortInfo const &)" (?scanUsbHub@XsScanner@@SA?AUXsUsbHubInfo@@AEBUXsPortInfo@@@Z)
xscontroller.lib(deviceredetector.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_scanPorts referenced in function "public: static struct XsPortInfoArray __cdecl XsScanner::scanPorts(enum XsBaudRate,int,bool,bool)" (?scanPorts@XsScanner@@SA?AUXsPortInfoArray@@W4XsBaudRate@@H_N1@Z)
xscontroller.lib(deviceredetector.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_scanPort referenced in function "public: static bool __cdecl XsScanner::scanPort(struct XsPortInfo &,enum XsBaudRate,int,bool)" (?scanPort@XsScanner@@SA_NAEAUXsPortInfo@@W4XsBaudRate@@H_N@Z)
xscontroller.lib(deviceredetector.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_enumerateSerialPorts referenced in function "public: static struct XsPortInfoArray __cdecl XsScanner::enumerateSerialPorts(bool)" (?enumerateSerialPorts@XsScanner@@SA?AUXsPortInfoArray@@_N@Z)
lib\yarp\xsensmt.dll : fatal error LNK1120: 14 unresolved externals
ninja: build stopped: subcommand failed.

@traversaro
Copy link
Member Author

Now I have some linking errors:

[1/2] Linking CXX executable xsensmt\yarp-xsensmt-example.exe
FAILED: xsensmt/yarp-xsensmt-example.exe
cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=xsensmt\CMakeFiles\yarp-xsensmt-example.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~3\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo xsensmt\CMakeFiles\yarp-xsensmt-example.dir\exampleScanDevicesAndReceiveData.cpp.obj  /out:xsensmt\yarp-xsensmt-example.exe /implib:xsensmt\yarp-xsensmt-example.lib /pdb:xsensmt\yarp-xsensmt-example.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console  extern\xscontroller.lib  extern\xscommon.lib  extern\xstypes.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~2\MICROS~3\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo xsensmt\CMakeFiles\yarp-xsensmt-example.dir\exampleScanDevicesAndReceiveData.cpp.obj /out:xsensmt\yarp-xsensmt-example.exe /implib:xsensmt\yarp-xsensmt-example.lib /pdb:xsensmt\yarp-xsensmt-example.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console extern\xscontroller.lib extern\xscommon.lib extern\xstypes.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:xsensmt\CMakeFiles\yarp-xsensmt-example.dir/intermediate.manifest xsensmt\CMakeFiles\yarp-xsensmt-example.dir/manifest.res" failed (exit code 1120) with the following output:
exampleScanDevicesAndReceiveData.cpp.obj : error LNK2019: unresolved external symbol __imp_XsScanner_scanPorts referenced in function "public: static struct XsPortInfoArray __cdecl XsScanner::scanPorts(enum XsBaudRate,int,bool,bool)" (?scanPorts@XsScanner@@SA?AUXsPortInfoArray@@W4XsBaudRate@@H_N1@Z)
xscontroller.lib(deviceredetector.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsScanner_scanPorts
xscontroller.lib(xscontrol_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_g_xsDevicePtrArrayDescriptor referenced in function "public: __cdecl XsArrayImpl<struct XsDevice *,&struct XsArrayDescriptor const g_xsDevicePtrArrayDescriptor,struct XsDevicePtrArray>::XsArrayImpl<struct XsDevice *,&struct XsArrayDescriptor const g_xsDevicePtrArrayDescriptor,struct XsDevicePtrArray>(unsigned __int64,struct XsDevice * const *)" (??0?$XsArrayImpl@PEAUXsDevice@@$1?g_xsDevicePtrArrayDescriptor@@3UXsArrayDescriptor@@BUXsDevicePtrArray@@@@QEAA@_KPEBQEAUXsDevice@@@Z)
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2001: unresolved external symbol __imp_g_xsDevicePtrArrayDescriptor
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_assign referenced in function "public: __cdecl XsDeviceConfiguration::XsDeviceConfiguration(unsigned short)" (??0XsDeviceConfiguration@@QEAA@G@Z)
xscontroller.lib(mtbfilecommunicator.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_assign
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_destruct referenced in function "public: __cdecl XsDeviceConfiguration::~XsDeviceConfiguration(void)" (??1XsDeviceConfiguration@@QEAA@XZ)
xscontroller.lib(mtbfilecommunicator.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_destruct
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_copy referenced in function "public: __cdecl XsDeviceConfiguration::XsDeviceConfiguration(struct XsDeviceConfiguration const &)" (??0XsDeviceConfiguration@@QEAA@AEBU0@@Z)
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_readFromMessage referenced in function "public: void __cdecl XsDeviceConfiguration::readFromMessage(struct XsMessage const &)" (?readFromMessage@XsDeviceConfiguration@@QEAAXAEBUXsMessage@@@Z)
xscontroller.lib(mtbfilecommunicator.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_readFromMessage
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_writeToMessage referenced in function "public: void __cdecl XsDeviceConfiguration::writeToMessage(struct XsMessage &)const " (?writeToMessage@XsDeviceConfiguration@@QEBAXAEAUXsMessage@@@Z)
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_findDevice referenced in function "public: struct XsMtDeviceConfiguration const & __cdecl XsDeviceConfiguration::deviceInfo(struct XsDeviceId const &)const " (?deviceInfo@XsDeviceConfiguration@@QEBAAEBUXsMtDeviceConfiguration@@AEBUXsDeviceId@@@Z)
xscontroller.lib(mtdevice.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_findDevice
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsUsbHubInfo_construct referenced in function "public: __cdecl XsUsbHubInfo::XsUsbHubInfo(struct XsUsbHubInfo const &)" (??0XsUsbHubInfo@@QEAA@AEBU0@@Z)
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsUsbHubInfo_destruct referenced in function "public: __cdecl XsUsbHubInfo::~XsUsbHubInfo(void)" (??1XsUsbHubInfo@@QEAA@XZ)
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsUsbHubInfo_parentPathMatches referenced in function "public: bool __cdecl XsUsbHubInfo::parentPathMatches(struct XsUsbHubInfo const &)const " (?parentPathMatches@XsUsbHubInfo@@QEBA_NAEBU1@@Z)
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_scanUsbHub referenced in function "public: static struct XsUsbHubInfo __cdecl XsScanner::scanUsbHub(struct XsPortInfo const &)" (?scanUsbHub@XsScanner@@SA?AUXsUsbHubInfo@@AEBUXsPortInfo@@@Z)
xscontroller.lib(deviceredetector.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_scanPort referenced in function "public: static bool __cdecl XsScanner::scanPort(struct XsPortInfo &,enum XsBaudRate,int,bool)" (?scanPort@XsScanner@@SA_NAEAUXsPortInfo@@W4XsBaudRate@@H_N@Z)
xscontroller.lib(deviceredetector.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_enumerateSerialPorts referenced in function "public: static struct XsPortInfoArray __cdecl XsScanner::enumerateSerialPorts(bool)" (?enumerateSerialPorts@XsScanner@@SA?AUXsPortInfoArray@@_N@Z)
xsensmt\yarp-xsensmt-example.exe : fatal error LNK1120: 14 unresolved externals
[2/2] Linking CXX shared module lib\yarp\xsensmt.dll
FAILED: lib/yarp/xsensmt.dll
cmd.exe /C "cd . && "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_dll --intdir=xsensmt\CMakeFiles\xsensmt.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~3\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo xsensmt\CMakeFiles\xsensmt.dir\XsensMT.cpp.obj xsensmt\CMakeFiles\xsensmt.dir\yarp_plugin_xsensmt.cpp.obj  /out:lib\yarp\xsensmt.dll /implib:xsensmt\xsensmt.lib /pdb:lib\yarp\xsensmt.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL  C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_dev.lib  C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_math.lib  C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_sig.lib  C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_os.lib  extern\xscontroller.lib  extern\xscommon.lib  extern\xstypes.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
LINK Pass 1: command "C:\PROGRA~2\MICROS~3\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\link.exe /nologo xsensmt\CMakeFiles\xsensmt.dir\XsensMT.cpp.obj xsensmt\CMakeFiles\xsensmt.dir\yarp_plugin_xsensmt.cpp.obj /out:lib\yarp\xsensmt.dll /implib:xsensmt\xsensmt.lib /pdb:lib\yarp\xsensmt.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_dev.lib C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_math.lib C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_sig.lib C:\Users\straversaro\AppData\Local\miniforge3\envs\yarpdevicexsensmtdev\Library\lib\YARP_os.lib extern\xscontroller.lib extern\xscommon.lib extern\xstypes.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:xsensmt\CMakeFiles\xsensmt.dir/intermediate.manifest xsensmt\CMakeFiles\xsensmt.dir/manifest.res" failed (exit code 1120) with the following output:
   Creating library xsensmt\xsensmt.lib and object xsensmt\xsensmt.exp
xscontroller.lib(xscontrol_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_g_xsDevicePtrArrayDescriptor referenced in function "public: __cdecl XsArrayImpl<struct XsDevice *,&struct XsArrayDescriptor const g_xsDevicePtrArrayDescriptor,struct XsDevicePtrArray>::XsArrayImpl<struct XsDevice *,&struct XsArrayDescriptor const g_xsDevicePtrArrayDescriptor,struct XsDevicePtrArray>(unsigned __int64,struct XsDevice * const *)" (??0?$XsArrayImpl@PEAUXsDevice@@$1?g_xsDevicePtrArrayDescriptor@@3UXsArrayDescriptor@@BUXsDevicePtrArray@@@@QEAA@_KPEBQEAUXsDevice@@@Z)
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2001: unresolved external symbol __imp_g_xsDevicePtrArrayDescriptor
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_assign referenced in function "public: __cdecl XsDeviceConfiguration::XsDeviceConfiguration(unsigned short)" (??0XsDeviceConfiguration@@QEAA@G@Z)
xscontroller.lib(mtbfilecommunicator.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_assign
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_destruct referenced in function "public: __cdecl XsDeviceConfiguration::~XsDeviceConfiguration(void)" (??1XsDeviceConfiguration@@QEAA@XZ)
xscontroller.lib(mtbfilecommunicator.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_destruct
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_copy referenced in function "public: __cdecl XsDeviceConfiguration::XsDeviceConfiguration(struct XsDeviceConfiguration const &)" (??0XsDeviceConfiguration@@QEAA@AEBU0@@Z)
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_readFromMessage referenced in function "public: void __cdecl XsDeviceConfiguration::readFromMessage(struct XsMessage const &)" (?readFromMessage@XsDeviceConfiguration@@QEAAXAEBUXsMessage@@@Z)
xscontroller.lib(mtbfilecommunicator.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_readFromMessage
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_writeToMessage referenced in function "public: void __cdecl XsDeviceConfiguration::writeToMessage(struct XsMessage &)const " (?writeToMessage@XsDeviceConfiguration@@QEBAXAEAUXsMessage@@@Z)
xscontroller.lib(xsdevice_def.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsDeviceConfiguration_findDevice referenced in function "public: struct XsMtDeviceConfiguration const & __cdecl XsDeviceConfiguration::deviceInfo(struct XsDeviceId const &)const " (?deviceInfo@XsDeviceConfiguration@@QEBAAEBUXsMtDeviceConfiguration@@AEBUXsDeviceId@@@Z)
xscontroller.lib(mtdevice.cpp.obj) : error LNK2001: unresolved external symbol __imp_XsDeviceConfiguration_findDevice
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsUsbHubInfo_construct referenced in function "public: __cdecl XsUsbHubInfo::XsUsbHubInfo(struct XsUsbHubInfo const &)" (??0XsUsbHubInfo@@QEAA@AEBU0@@Z)
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsUsbHubInfo_destruct referenced in function "public: __cdecl XsUsbHubInfo::~XsUsbHubInfo(void)" (??1XsUsbHubInfo@@QEAA@XZ)
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsUsbHubInfo_parentPathMatches referenced in function "public: bool __cdecl XsUsbHubInfo::parentPathMatches(struct XsUsbHubInfo const &)const " (?parentPathMatches@XsUsbHubInfo@@QEBA_NAEBU1@@Z)
xscontroller.lib(serialcommunicator.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_scanUsbHub referenced in function "public: static struct XsUsbHubInfo __cdecl XsScanner::scanUsbHub(struct XsPortInfo const &)" (?scanUsbHub@XsScanner@@SA?AUXsUsbHubInfo@@AEBUXsPortInfo@@@Z)
xscontroller.lib(deviceredetector.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_scanPorts referenced in function "public: static struct XsPortInfoArray __cdecl XsScanner::scanPorts(enum XsBaudRate,int,bool,bool)" (?scanPorts@XsScanner@@SA?AUXsPortInfoArray@@W4XsBaudRate@@H_N1@Z)
xscontroller.lib(deviceredetector.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_scanPort referenced in function "public: static bool __cdecl XsScanner::scanPort(struct XsPortInfo &,enum XsBaudRate,int,bool)" (?scanPort@XsScanner@@SA_NAEAUXsPortInfo@@W4XsBaudRate@@H_N@Z)
xscontroller.lib(deviceredetector.cpp.obj) : error LNK2019: unresolved external symbol __imp_XsScanner_enumerateSerialPorts referenced in function "public: static struct XsPortInfoArray __cdecl XsScanner::enumerateSerialPorts(bool)" (?enumerateSerialPorts@XsScanner@@SA?AUXsPortInfoArray@@_N@Z)
lib\yarp\xsensmt.dll : fatal error LNK1120: 14 unresolved externals
ninja: build stopped: subcommand failed.

Ok, this was solved by:

  • making sure that the correct dllimport/dllexport annotation were used by defining the appropriate macro for compilaton as a static library
  • linking a missing Windows system library

Windows compilaton is fixed in #46 .

@HosameldinMohamed
Copy link
Contributor

HosameldinMohamed commented Oct 17, 2023

@HosameldinMohamed did you remember why we added the lines:

target_compile_options(xscommon PRIVATE "SHELL:-include xscommon_config.h" "SHELL:-include xstypes/xsens_compat.h")

?

I could not find anything in the PR and issue.

I think it was done in the recent migration of the SDK to version 2022 (#38). Xsens provided the Make files, while the above seems like our translation to CMake of these files.. If I understood correctly.

For example.. here's a screenshot of one of the Make files:
image

@HosameldinMohamed
Copy link
Contributor

Now that I see you're trying to fix Windows installation, I realized that we copied and integrated here the SDK we've downloaded from Xsens for Linux.

Most likely the missing parts for Windows should be what you are fixing now in #46!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants