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

Error while building motorThorlabs with Kinesis support #6

Open
ps3017 opened this issue Mar 13, 2024 · 2 comments
Open

Error while building motorThorlabs with Kinesis support #6

ps3017 opened this issue Mar 13, 2024 · 2 comments

Comments

@ps3017
Copy link

ps3017 commented Mar 13, 2024

Hi,
I wanted to build the motorThorlabs submodule outside motor with Kinesis support and build the example IOC as well. I updated the RELEASE.local file, and set WITH_KINESIS = YES and BUILD_IOCS = YES in CONFIG_SITE.local. I'm working inside MSYS2 UCRT64 on a Windows 10 system. When executing "make" in the "motorThorlabs" directory I got the following output:

make -C ./configure install
make[1]: Entering directory '/home/user/motorThorLabs/configure'
perl -CSD C:/msys64/home/user/base-7.0.7/bin/windows-x64-mingw/makeMakefile.pl O.windows-x64-mingw ../..
perl -CSD -MExtUtils::Command -e mkpath O.Common
make -C O.windows-x64-mingw -f ../Makefile TOP=../.. \
    T_A=windows-x64-mingw install
make[2]: Entering directory '/home/user/motorThorLabs/configure/O.windows-x64-mingw'
perl -CSD C:/msys64/home/user/base-7.0.7/bin/windows-x64-mingw/convertRelease.pl checkRelease
make[2]: Leaving directory '/home/user/motorThorLabs/configure/O.windows-x64-mingw'
make[1]: Leaving directory '/home/user/motorThorLabs/configure'
make -C ./thorlabsApp install
make[1]: Entering directory '/home/user/motorThorLabs/thorlabsApp'
make -C ./src install
make[2]: Entering directory '/home/user/motorThorLabs/thorlabsApp/src'
perl -CSD C:/msys64/home/user/base-7.0.7/bin/windows-x64-mingw/makeMakefile.pl O.windows-x64-mingw ../../..
perl -CSD -MExtUtils::Command -e mkpath O.Common
make -C O.windows-x64-mingw -f ../Makefile TOP=../../.. \
    T_A=windows-x64-mingw install
make[3]: Entering directory '/home/user/motorThorLabs/thorlabsApp/src/O.windows-x64-mingw'
g++             -D_MINGW -D__USE_MINGW_ANSI_STDIO      -O3   -Wall    -DDEBUG  -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL    -I. -I../O.Common -I. -I. -I.. -I../../../thorlabsApp/src/kinesis -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include   -IC:/msys64/home/user/base-7.0.7/support/motor/include   -IC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/include    -IC:/msys64/home/user/base-7.0.7/include/compiler/gcc -IC:/msys64/home/user/base-7.0.7/include/os/WIN32 -IC:/msys64/home/user/base-7.0.7/include          -IC:/Progra~1/Thorlabs/Kinesis     -MM -MF ThorLabsRegister.d -MT ThorLabsRegister.obj ../ThorLabsRegister.cc
g++             -D_MINGW -D__USE_MINGW_ANSI_STDIO      -O3   -Wall    -DDEBUG  -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL    -I. -I../O.Common -I. -I. -I.. -I../../../thorlabsApp/src/kinesis -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include   -IC:/msys64/home/user/base-7.0.7/support/motor/include   -IC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/include    -IC:/msys64/home/user/base-7.0.7/include/compiler/gcc -IC:/msys64/home/user/base-7.0.7/include/os/WIN32 -IC:/msys64/home/user/base-7.0.7/include          -IC:/Progra~1/Thorlabs/Kinesis     -MM -MF devMDT695.d -MT devMDT695.obj ../devMDT695.cc
g++             -D_MINGW -D__USE_MINGW_ANSI_STDIO      -O3   -Wall    -DDEBUG  -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL    -I. -I../O.Common -I. -I. -I.. -I../../../thorlabsApp/src/kinesis -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include   -IC:/msys64/home/user/base-7.0.7/support/motor/include   -IC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/include    -IC:/msys64/home/user/base-7.0.7/include/compiler/gcc -IC:/msys64/home/user/base-7.0.7/include/os/WIN32 -IC:/msys64/home/user/base-7.0.7/include          -IC:/Progra~1/Thorlabs/Kinesis     -MM -MF drvMDT695.d -MT drvMDT695.obj ../drvMDT695.cc
g++             -D_MINGW -D__USE_MINGW_ANSI_STDIO      -O3   -Wall    -DDEBUG  -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL    -I. -I../O.Common -I. -I. -I.. -I../../../thorlabsApp/src/kinesis -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include   -IC:/msys64/home/user/base-7.0.7/support/motor/include   -IC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/include    -IC:/msys64/home/user/base-7.0.7/include/compiler/gcc -IC:/msys64/home/user/base-7.0.7/include/os/WIN32 -IC:/msys64/home/user/base-7.0.7/include          -IC:/Progra~1/Thorlabs/Kinesis     -MM -MF drvKinesis.d -MT drvKinesis.obj ../../../thorlabsApp/src/kinesis/drvKinesis.cpp
g++             -D_MINGW -D__USE_MINGW_ANSI_STDIO      -O3   -Wall    -DDEBUG  -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL    -I. -I../O.Common -I. -I. -I.. -I../../../thorlabsApp/src/kinesis -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include   -IC:/msys64/home/user/base-7.0.7/support/motor/include   -IC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/include    -IC:/msys64/home/user/base-7.0.7/include/compiler/gcc -IC:/msys64/home/user/base-7.0.7/include/os/WIN32 -IC:/msys64/home/user/base-7.0.7/include          -IC:/Progra~1/Thorlabs/Kinesis     -MM -MF drvKinesisStepper.d -MT drvKinesisStepper.obj ../../../thorlabsApp/src/kinesis/drvKinesisStepper.cpp
g++             -D_MINGW -D__USE_MINGW_ANSI_STDIO      -O3   -Wall    -DDEBUG  -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL    -I. -I../O.Common -I. -I. -I.. -I../../../thorlabsApp/src/kinesis -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include   -IC:/msys64/home/user/base-7.0.7/support/motor/include   -IC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/include    -IC:/msys64/home/user/base-7.0.7/include/compiler/gcc -IC:/msys64/home/user/base-7.0.7/include/os/WIN32 -IC:/msys64/home/user/base-7.0.7/include          -IC:/Progra~1/Thorlabs/Kinesis     -MM -MF drvKinesisDC.d -MT drvKinesisDC.obj ../../../thorlabsApp/src/kinesis/drvKinesisDC.cpp
g++             -D_MINGW -D__USE_MINGW_ANSI_STDIO      -O3   -Wall    -DDEBUG  -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL    -I. -I../O.Common -I. -I. -I.. -I../../../thorlabsApp/src/kinesis -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include   -IC:/msys64/home/user/base-7.0.7/support/motor/include   -IC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/include    -IC:/msys64/home/user/base-7.0.7/include/compiler/gcc -IC:/msys64/home/user/base-7.0.7/include/os/WIN32 -IC:/msys64/home/user/base-7.0.7/include          -IC:/Progra~1/Thorlabs/Kinesis    -o ThorLabsRegister.obj -c ../ThorLabsRegister.cc
g++             -D_MINGW -D__USE_MINGW_ANSI_STDIO      -O3   -Wall    -DDEBUG  -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL    -I. -I../O.Common -I. -I. -I.. -I../../../thorlabsApp/src/kinesis -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include   -IC:/msys64/home/user/base-7.0.7/support/motor/include   -IC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/include    -IC:/msys64/home/user/base-7.0.7/include/compiler/gcc -IC:/msys64/home/user/base-7.0.7/include/os/WIN32 -IC:/msys64/home/user/base-7.0.7/include          -IC:/Progra~1/Thorlabs/Kinesis    -o devMDT695.obj -c ../devMDT695.cc
../devMDT695.cc: In function 'RTN_STATUS MDT695_build_trans(motor_cmnd, double*, motorRecord*)':
../devMDT695.cc:190:42: warning: the address of 'motorRecord::init' will never be NULL [-Waddress]
  190 |     if (command == PRIMITIVE && mr->init != NULL && strlen(mr->init) != 0)
      |                                          ^
In file included from ../devMDT695.cc:42:
C:/msys64/home/user/base-7.0.7/support/motor/include/motorRecord.h:311:25: note: 'motorRecord::init' declared here
  311 |     char                init[40];   /**< @brief Startup commands */
      |                         ^~~~
../devMDT695.cc:157:9: warning: variable 'signal' set but not used [-Wunused-but-set-variable]
  157 |     int signal, card, intval;
      |         ^~~~~~
../devMDT695.cc:157:23: warning: variable 'intval' set but not used [-Wunused-but-set-variable]
  157 |     int signal, card, intval;
      |                       ^~~~~~
../devMDT695.cc:160:10: warning: variable 'sendMsg' set but not used [-Wunused-but-set-variable]
  160 |     bool sendMsg;
      |          ^~~~~~~
g++             -D_MINGW -D__USE_MINGW_ANSI_STDIO      -O3   -Wall    -DDEBUG  -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL    -I. -I../O.Common -I. -I. -I.. -I../../../thorlabsApp/src/kinesis -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include   -IC:/msys64/home/user/base-7.0.7/support/motor/include   -IC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/include    -IC:/msys64/home/user/base-7.0.7/include/compiler/gcc -IC:/msys64/home/user/base-7.0.7/include/os/WIN32 -IC:/msys64/home/user/base-7.0.7/include          -IC:/Progra~1/Thorlabs/Kinesis    -o drvMDT695.obj -c ../drvMDT695.cc
../drvMDT695.cc: In function 'int set_status(int, int)':
../drvMDT695.cc:213:30: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
  213 |   register struct mess_info *motor_info;
      |                              ^~~~~~~~~~
../drvMDT695.cc:219:7: warning: variable 'motor' set but not used [-Wunused-but-set-variable]
  219 |   int motor;
      |       ^~~~~
../drvMDT695.cc:336:16: warning: 'char* strncpy(char*, const char*, size_t)' specified bound 80 equals destination size [-Wstringop-truncation]
  336 |         strncpy(send_buff, nodeptr->postmsgptr, 80);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++             -D_MINGW -D__USE_MINGW_ANSI_STDIO      -O3   -Wall    -DDEBUG  -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL    -I. -I../O.Common -I. -I. -I.. -I../../../thorlabsApp/src/kinesis -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include   -IC:/msys64/home/user/base-7.0.7/support/motor/include   -IC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/include    -IC:/msys64/home/user/base-7.0.7/include/compiler/gcc -IC:/msys64/home/user/base-7.0.7/include/os/WIN32 -IC:/msys64/home/user/base-7.0.7/include          -IC:/Progra~1/Thorlabs/Kinesis    -o drvKinesis.obj -c ../../../thorlabsApp/src/kinesis/drvKinesis.cpp
g++             -D_MINGW -D__USE_MINGW_ANSI_STDIO      -O3   -Wall    -DDEBUG  -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL    -I. -I../O.Common -I. -I. -I.. -I../../../thorlabsApp/src/kinesis -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include   -IC:/msys64/home/user/base-7.0.7/support/motor/include   -IC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/include    -IC:/msys64/home/user/base-7.0.7/include/compiler/gcc -IC:/msys64/home/user/base-7.0.7/include/os/WIN32 -IC:/msys64/home/user/base-7.0.7/include          -IC:/Progra~1/Thorlabs/Kinesis    -o drvKinesisStepper.obj -c ../../../thorlabsApp/src/kinesis/drvKinesisStepper.cpp
g++             -D_MINGW -D__USE_MINGW_ANSI_STDIO      -O3   -Wall    -DDEBUG  -m64    -DEPICS_BUILD_DLL -DEPICS_CALL_DLL    -I. -I../O.Common -I. -I. -I.. -I../../../thorlabsApp/src/kinesis -I../../../include/compiler/gcc -I../../../include/os/WIN32 -I../../../include   -IC:/msys64/home/user/base-7.0.7/support/motor/include   -IC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/include    -IC:/msys64/home/user/base-7.0.7/include/compiler/gcc -IC:/msys64/home/user/base-7.0.7/include/os/WIN32 -IC:/msys64/home/user/base-7.0.7/include          -IC:/Progra~1/Thorlabs/Kinesis    -o drvKinesisDC.obj -c ../../../thorlabsApp/src/kinesis/drvKinesisDC.cpp
g++ -o ThorLabs.dll  -shared -Wl,--out-implib,libThorLabs.dll.a -L/home/user/motorThorLabs/lib/windows-x64-mingw -LC:/msys64/home/user/base-7.0.7/lib/windows-x64-mingw -LC:/msys64/home/user/base-7.0.7/support/asyn-master/asyn-master/lib/windows-x64-mingw -LC:/msys64/home/user/base-7.0.7/support/motor/lib/windows-x64-mingw       -m64            ThorLabsRegister.obj devMDT695.obj drvMDT695.obj drvKinesis.obj drvKinesisStepper.obj drvKinesisDC.obj     -lmotor -lasyn -ldbRecStd -ldbCore -lca -lCom       -lm -lpsapi -lws2_32 -ladvapi32 -luser32 -lkernel32 -lwinmm -ldbghelp
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0xa): undefined reference to `__imp_SCC_Close'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x1a): undefined reference to `__imp_SCC_StartPolling'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x2a): undefined reference to `__imp_SCC_StopPolling'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x3a): undefined reference to `__imp_SCC_EnableChannel'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x4a): undefined reference to `__imp_SCC_DisableChannel'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x6f): undefined reference to `__imp_SCC_DisableChannel'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x78): undefined reference to `__imp_SCC_StopPolling'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x81): undefined reference to `__imp_SCC_Close'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0xba): undefined reference to `__imp_SCC_GetPosition'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0xca): undefined reference to `__imp_SCC_GetStatusBits'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0xde): undefined reference to `__imp_SCC_MoveRelative'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0xfe): undefined reference to `__imp_SCC_MoveToPosition'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x11a): undefined reference to `__imp_SCC_CanHome'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x12a): undefined reference to `__imp_SCC_Home'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x13d): undefined reference to `__imp_SCC_StopImmediate'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x15b): undefined reference to `__imp_TLI_BuildDeviceList'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x16b): undefined reference to `__imp_SCC_Open'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x196): undefined reference to `__imp_SCC_StartPolling'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x1bc): undefined reference to `__imp_SCC_EnableChannel'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x20f): undefined reference to `__imp_SCC_DisableChannel'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x218): undefined reference to `__imp_SCC_StopPolling'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x221): undefined reference to `__imp_SCC_Close'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x26a): undefined reference to `__imp_TLI_BuildDeviceList'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x27a): undefined reference to `__imp_SCC_Open'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x28f): undefined reference to `__imp_SCC_StartPolling'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisStepper.obj:drvKinesisStepper.cpp:(.text+0x298): undefined reference to `__imp_SCC_EnableChannel'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0xa): undefined reference to `__imp_CC_Close'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x1a): undefined reference to `__imp_CC_StartPolling'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x2a): undefined reference to `__imp_CC_StopPolling'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x3a): undefined reference to `__imp_CC_EnableChannel'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x4a): undefined reference to `__imp_CC_DisableChannel'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x6f): undefined reference to `__imp_CC_DisableChannel'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x78): undefined reference to `__imp_CC_StopPolling'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x81): undefined reference to `__imp_CC_Close'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0xba): undefined reference to `__imp_CC_GetPosition'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0xca): undefined reference to `__imp_CC_GetStatusBits'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0xde): undefined reference to `__imp_CC_MoveRelative'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0xfe): undefined reference to `__imp_CC_MoveToPosition'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x11a): undefined reference to `__imp_CC_CanHome'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x12a): undefined reference to `__imp_CC_Home'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x13d): undefined reference to `__imp_CC_StopImmediate'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x15b): undefined reference to `__imp_TLI_BuildDeviceList'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x16b): undefined reference to `__imp_CC_Open'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x196): undefined reference to `__imp_CC_StartPolling'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x1bc): undefined reference to `__imp_CC_EnableChannel'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x20f): undefined reference to `__imp_CC_DisableChannel'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x218): undefined reference to `__imp_CC_StopPolling'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x221): undefined reference to `__imp_CC_Close'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x26a): undefined reference to `__imp_TLI_BuildDeviceList'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x27a): undefined reference to `__imp_CC_Open'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x28f): undefined reference to `__imp_CC_StartPolling'
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: drvKinesisDC.obj:drvKinesisDC.c:(.text+0x298): undefined reference to `__imp_CC_EnableChannel'
collect2.exe: error: ld returned 1 exit status
make[3]: *** [C:/msys64/home/user/base-7.0.7/configure/RULES_BUILD:316: ThorLabs.dll] Error 1
make[3]: Leaving directory '/home/user/motorThorLabs/thorlabsApp/src/O.windows-x64-mingw'
make[2]: *** [C:/msys64/home/user/base-7.0.7/configure/RULES_ARCHS:58: install.windows-x64-mingw] Error 2
make[2]: Leaving directory '/home/user/motorThorLabs/thorlabsApp/src'
make[1]: *** [C:/msys64/home/user/base-7.0.7/configure/RULES_DIRS:85: src.install] Error 2
make[1]: Leaving directory '/home/user/motorThorLabs/thorlabsApp'
make: *** [C:/msys64/home/user/base-7.0.7/configure/RULES_DIRS:85: thorlabsApp.install] Error 2

Do you know what's the cause of the "undefined reference" errors I'm getting?

Thanks in advance!

@kmpeters
Copy link
Contributor

It looks like a THORLABS_DIR also needs ot be defined in the CONFIG_SITE or CONFIG_SITE.local file:

USR_INCLUDES = -I$(THORLABS_DIR)

@ps3017
Copy link
Author

ps3017 commented Mar 14, 2024

Hi,
the THORLABS_DIR was already defined in CONFIG_SITE.local when I was getting the error. I am building the module inside MSYS2 UCRT64 with arch: windows-x64-mingw. What solved the reported build error was adding the line USR_LDFLAGS = -L$(THORLABS_DIR) to the file "motorThorLabs/thorlabsApp/src/Makefile" and changing ThorLabs_DLL_LIBS to ThorLabs_SYS_LIBS. This is the updated Makefile:

# Makefile
TOP = ../..
include $(TOP)/configure/CONFIG

# The following are used for debugging messages.
USR_CXXFLAGS += -DDEBUG

#OPT_CXXFLAGS = -g -O0

DBD += devThorLabs.dbd

LIBRARY_IOC = ThorLabs

# Intelligent Motion Systems driver support.
SRCS += ThorLabsRegister.cc
SRCS += devMDT695.cc drvMDT695.cc

ifeq ($(WITH_KINESIS),YES)
    SRC_DIRS += $(TOP)/thorlabsApp/src/kinesis
    
    USR_INCLUDES = -I$(THORLABS_DIR)
    
    USR_LDFLAGS = -L$(THORLABS_DIR)
    
    DBD += devThorLabsKinesis.dbd
    
    SRCS += drvKinesis.cpp
    SRCS += drvKinesisStepper.cpp
    SRCS += drvKinesisDC.cpp
    
    Thorlabs.MotionControl.KCube.DCServo_DIR += $(THORLABS_DIR)
    ThorLabs_SYS_LIBS += Thorlabs.MotionControl.KCube.DCServo

    Thorlabs.MotionControl.KCube.StepperMotor_DIR += $(THORLABS_DIR)
    ThorLabs_SYS_LIBS += Thorlabs.MotionControl.KCube.StepperMotor
endif


ThorLabs_LIBS += motor asyn
ThorLabs_LIBS += $(EPICS_BASE_IOC_LIBS)

include $(TOP)/configure/RULES

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

No branches or pull requests

2 participants