Compiler/DLP4500: Problems when running "mingw32-make" for building TI-DLP4500 SDK.

Part Number: DLP4500

Tool/software: TI C/C++ Compiler

Hello,

As per the TI employee request here I have created a new thread for the compiler issue. I followed the steps as per the documentation here . However I am getting stuck at the stage where "mingw32-make" needs to be run. After running that the software is built to 97% and then the follwoing error occurs (screenshot included):

[ 96%] Building CXX object CMakeFiles/camera_view_pg_flycap2_c.dir/examples/camera_view_pg_flycap2_c.cpp.obj
[ 97%] Linking CXX executable bin\camera_view_pg_flycap2_c.exe
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x710): undefined reference to `_imp__fc2DestroyImage'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0xa73): undefined reference to `_imp__fc2CreateContext'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0xb46): undefined reference to `_imp__fc2GetNumOfCameras'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0xe37): undefined reference to `_imp__fc2GetCameraFromIndex'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0xf1a): undefined reference to `_imp__fc2Connect'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x1016): undefined reference to `_imp__fc2GetCameraInfo'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x163e): undefined reference to `_imp__fc2GetFormat7Info'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x1c58): undefined reference to `_imp__fc2ValidateFormat7Settings'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x1f04): undefined reference to `_imp__fc2ValidateFormat7Settings'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x21c4): undefined reference to `_imp__fc2SetFormat7Configuration'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x241c): undefined reference to `_imp__fc2SetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x2583): undefined reference to `_imp__fc2GetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x2735): undefined reference to `_imp__fc2SetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x289c): undefined reference to `_imp__fc2GetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x2c07): undefined reference to `_imp__fc2SetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x2d6e): undefined reference to `_imp__fc2GetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x3079): undefined reference to `_imp__fc2SetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x31e0): undefined reference to `_imp__fc2GetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x345e): undefined reference to `_imp__fc2SetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x35c5): undefined reference to `_imp__fc2GetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x3843): undefined reference to `_imp__fc2SetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x39aa): undefined reference to `_imp__fc2GetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x3bfb): undefined reference to `_imp__fc2SetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x3d62): undefined reference to `_imp__fc2GetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x3fd4): undefined reference to `_imp__fc2SetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x413b): undefined reference to `_imp__fc2GetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x4379): undefined reference to `_imp__fc2SetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x44e0): undefined reference to `_imp__fc2GetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x4766): undefined reference to `_imp__fc2SetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x48cd): undefined reference to `_imp__fc2GetProperty'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x4a7f): undefined reference to `_imp__fc2GetTriggerMode'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x4ec5): undefined reference to `_imp__fc2SetTriggerMode'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x5136): undefined reference to `_imp__fc2ReadRegister'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x54fd): undefined reference to `_imp__fc2SetTriggerDelay'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x5664): undefined reference to `_imp__fc2GetTriggerDelay'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x5831): undefined reference to `_imp__fc2GetStrobe'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x5b11): undefined reference to `_imp__fc2SetStrobe'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x7438): undefined reference to `_imp__fc2StopCapture'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x74af): undefined reference to `_imp__fc2Disconnect'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x769e): undefined reference to `_imp__fc2CreateImage'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x76b2): undefined reference to `_imp__fc2ConvertImage'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x76fa): undefined reference to `_imp__fc2DestroyImage'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x78db): undefined reference to `_imp__fc2DestroyImage'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x79ce): undefined reference to `_imp__fc2StartCaptureCallback'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x7ddc): undefined reference to `_imp__fc2CreateImage'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x7e19): undefined reference to `_imp__fc2ConvertImageTo'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x7e97): undefined reference to `_imp__fc2ConvertImageTo'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x7f04): undefined reference to `_imp__fc2DestroyImage'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x7f11): undefined reference to `_imp__fc2DestroyImage'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x8030): undefined reference to `_imp__fc2CreateImage'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x806d): undefined reference to `_imp__fc2ConvertImageTo'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x80eb): undefined reference to `_imp__fc2ConvertImageTo'
lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj):pg_flycap2_c.cpp:(.text+0x814e): undefined reference to `_imp__fc2DestroyImage'
C:/Qt/Qt5.3.2/Tools/mingw482_32/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-mingw32/bin/ld.exe: lib/libDLP_SDK.a(pg_flycap2_c.cpp.obj): bad reloc address 0x16 in section `.text$_ZStoRRSt13_Ios_FmtflagsS_[__ZStoRRSt13_Ios_FmtflagsS_]'
collect2.exe: error: ld returned 1 exit status
CMakeFiles\camera_view_pg_flycap2_c.dir\build.make:97: recipe for target 'bin/camera_view_pg_flycap2_c.exe' failed
mingw32-make[2]: *** [bin/camera_view_pg_flycap2_c.exe] Error 1
CMakeFiles\Makefile2:445: recipe for target 'CMakeFiles/camera_view_pg_flycap2_c.dir/all' failed
mingw32-make[1]: *** [CMakeFiles/camera_view_pg_flycap2_c.dir/all] Error 2
Makefile:82: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

I am guessing there might be a problem in the CMakeLists file of the SDK in line 168 to 185:

if(DLP_BUILD_PG_FLYCAP2_C_CAMERA_MODULE)
    
    if (WIN32)    
    
        find_library(   PG_FLYCAP_LIB           FlyCapture2                 "${PG_FLYCAP_DIR}/lib")
        find_library(   PG_FLYCAP_LIB_C         FlyCapture2_C               "${PG_FLYCAP_DIR}/lib/C")
        get_filename_component(PG_FLYCAP_LIB_DIR "${PG_FLYCAP_LIB}"     DIRECTORY)
        get_filename_component(PG_FLYCAP_DIR     "${PG_FLYCAP_LIB_DIR}" DIRECTORY)

        find_path(      PG_FLYCAP_BIN_DIR       FlyCapture2.dll             "${PG_FLYCAP_DIR}/bin")
        find_path(      PG_FLYCAP_INCLUDE_DIR   C/FlyCapture2_C.h           "${PG_FLYCAP_DIR}/include")
        
    endif (WIN32)

I have also included a screenshot to show that configure and generate step from CMake was done correctly. What could be the problem for the mingw32-make command to fail?

I look forward to your prompt response. Thank you.

6 Replies

  • Hi Sidharth,

    Allow us to look into this and we will get back to you. I know you were working with another member of our team earlier to help resolve this. It sounds like you may be running into compiling specific and CMake issue though. As we look into what were are able to do, I would suggest exploring some Cmake tutorials that will better help you get the program up and running.

    Thanks,
    Kyle
  • In reply to Kyle Rakos:

    Hi Kyle,

    I've searched online for the problem and I've still not been able to resolve it. From my understanding, I don't think this is a CMake issue specifically as, if you look at the screenshot both the CMake "configure" and "Generate" steps produce no error. The error is produced when building it while running "mingw32-make" command. Looking at the error message I think the makefile is not able to link the paths correctly from the CMakeLists file. Could it be a problem in the CMakeLists file ?
  • In reply to Kyle Rakos:

    Hi Kyle,

    Have you had a chance to try and debug the issue when running the mingw-32 command? This is a time sensitive project and it has already taken alot of time to debug it to this stage. I would really appreciate a prompt response or any help as to why the error is there when running mingw32-make command. Thank you for your help.

    Best regards,

    Sidharth Makhija
  • In reply to Kyle Rakos:

    Hi Kyle,

    I found another post with a similar issue here:

    I have the same configuration in CMake as the post but still showing the same error. I don't think it's a CMake issue as the Configure and Generate steps in CMake ran without any error. Could there be some error in the CMake lists file of the SDK? I look forward to your response, thank you!

    Best regards,

    Sidharth Makhija

  • Hi Sidharth,
    Currently we have some issues building the SDK on windows 10 PCs. Kindly wait while we investigate the issue and get back.
    Regards,
    Hirak.
  • In reply to Hirak Biswas:

    Hi Sidharth,

    Apologies for the delay in response. The SDK has been developed and tested on Windows 7 PCs. Unfortunately Windows 10 has some inherent issues with the compiler used, and is not supported by TI for this SDK. I suggest kindly consider using a Windows 7 system to compile the SDK and see if the problem exists.

    Thanks & Regards,
    Hirak.