This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

  • TI Thinks Resolved

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

Prodigy 235 points

Replies: 18

Views: 2723

Part Number: DLP4500

Tool/software: TI C/C++ Compiler


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 (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.

  • 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.

  • 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.
  • 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,
  • In reply to Hirak Biswas:

    Hi Hirak,

    I have been able to build the SDK and the application on Windows 7 32 bit. I have modified the code to print out the Format 7 settings where the error is genrated. Both the camera and the SDK have the same Format 7 modes but the error still comes up. I have attached the screenshots below. Could you help in suggesting any more changes to the code since the modes seem to be the same?

    Thank you.

    Sidharth Makhija

  • In reply to Sidharth Makhija:

    Hi Sidharth,

    Looking into the PointGrey API documentation camera_error = 22 point to INVALID LUT.  The pixelFormat seems to be incorrect, this is enumeration values as follows -  can you force it to '0' (MONO8) and then test. 

    enum fc2PixelFormat

    Pixel formats available for Format7 modes.
    FC2_PIXEL_FORMAT_MONO8 8 bits of mono information.
    FC2_PIXEL_FORMAT_411YUV8 YUV 4:1:1.
    FC2_PIXEL_FORMAT_422YUV8 YUV 4:2:2.
    FC2_PIXEL_FORMAT_444YUV8 YUV 4:4:4.
    FC2_PIXEL_FORMAT_RGB8 R = G = B = 8 bits.
    FC2_PIXEL_FORMAT_MONO16 16 bits of mono information.
    FC2_PIXEL_FORMAT_RGB16 R = G = B = 16 bits.
    FC2_PIXEL_FORMAT_S_MONO16 16 bits of signed mono information.
    FC2_PIXEL_FORMAT_S_RGB16 R = G = B = 16 bits signed.
    FC2_PIXEL_FORMAT_RAW8 8 bit raw data output of sensor.
    FC2_PIXEL_FORMAT_RAW16 16 bit raw data output of sensor.
    FC2_PIXEL_FORMAT_MONO12 12 bits of mono information.
    FC2_PIXEL_FORMAT_RAW12 12 bit raw data output of sensor.
    FC2_PIXEL_FORMAT_BGR16 R = G = B = 16 bits.
    FC2_PIXEL_FORMAT_422YUV8_JPEG JPEG compressed stream.
    FC2_NUM_PIXEL_FORMATS Number of pixel formats.
    FC2_UNSPECIFIED_PIXEL_FORMAT Unspecified pixel format.


    If a post answers your question, please click on "Verify Answer" button

  • In reply to Sanjeev:

    Hi Sanjeev,

    Could you please point out what file are you referencing for the camera error numbers.? I was able to force the MONO8 mode and now I'm getting a camera_error = 17. This is the PG_FLYCAP_C_GET_STROBE_FAILED error. Thanks.


  • In reply to Sidharth Makhija:

    Hi Sidharth,

    You have to login to PointGrey website to download the camera model technical reference manual 

    Which documentation revision you are referring to? The one i am referring is  FlyCapture2 C v2.10.3.266  (API documentation), as per this camera_error = 17 reports FC2_ERROR_NOT_IN_FORMAT7.

    enum fc2Error

    The error types returned by functions.
    FC2_ERROR_UNDEFINED Undefined.
    FC2_ERROR_OK Function returned with no errors.
    FC2_ERROR_FAILED General failure.
    FC2_ERROR_NOT_IMPLEMENTED Function has not been implemented.
    FC2_ERROR_FAILED_BUS_MASTER_CONNECTION Could not connect to - Bus Master.
    FC2_ERROR_NOT_CONNECTED Camera has not been connected.
    FC2_ERROR_INIT_FAILED Initialization failed.
    FC2_ERROR_NOT_INTITIALIZED Camera has not been initialized.
    FC2_ERROR_INVALID_PARAMETER Invalid parameter passed to function.
    FC2_ERROR_INVALID_SETTINGS Setting set to camera is invalid.
    FC2_ERROR_INVALID_BUS_MANAGER Invalid Bus Manager object.
    FC2_ERROR_MEMORY_ALLOCATION_FAILED Could not allocate memory.
    FC2_ERROR_LOW_LEVEL_FAILURE Low level error.
    FC2_ERROR_NOT_FOUND Device not found.
    FC2_ERROR_INVALID_PACKET_SIZE Packet size set to camera is invalid.
    FC2_ERROR_INVALID_MODE Invalid mode has been passed to function.
    FC2_ERROR_NOT_IN_FORMAT7 Error due to not being in Format7.
    FC2_ERROR_NOT_SUPPORTED This feature is unsupported.
    FC2_ERROR_TIMEOUT Timeout error.
    FC2_ERROR_BUS_MASTER_FAILED Bus Master Failure.
    FC2_ERROR_INVALID_GENERATION Generation Count Mismatch.
    FC2_ERROR_LUT_FAILED Look Up Table failure.
    FC2_ERROR_STROBE_FAILED Strobe failure.
    FC2_ERROR_TRIGGER_FAILED Trigger failure.
    FC2_ERROR_PROPERTY_FAILED Property failure.
    FC2_ERROR_PROPERTY_NOT_PRESENT Property is not present.
    FC2_ERROR_REGISTER_FAILED Register access failed.
    FC2_ERROR_READ_REGISTER_FAILED Register read failed.
    FC2_ERROR_WRITE_REGISTER_FAILED Register write failed.
    FC2_ERROR_ISOCH_FAILED Isochronous failure.
    FC2_ERROR_ISOCH_ALREADY_STARTED Isochronous transfer has already been started.
    FC2_ERROR_ISOCH_NOT_STARTED Isochronous transfer has not been started.
    FC2_ERROR_ISOCH_START_FAILED Isochronous start failed.
    FC2_ERROR_ISOCH_RETRIEVE_BUFFER_FAILED Isochronous retrieve buffer failed.
    FC2_ERROR_ISOCH_STOP_FAILED Isochronous stop failed.
    FC2_ERROR_ISOCH_SYNC_FAILED Isochronous image synchronization failed.
    FC2_ERROR_ISOCH_BANDWIDTH_EXCEEDED Isochronous bandwidth exceeded.
    FC2_ERROR_IMAGE_CONVERSION_FAILED Image conversion failed.
    FC2_ERROR_IMAGE_LIBRARY_FAILURE Image library failure.
    FC2_ERROR_BUFFER_TOO_SMALL Buffer is too small.
    FC2_ERROR_IMAGE_CONSISTENCY_ERROR There is an image consistency error.
    FC2_ERROR_INCOMPATIBLE_DRIVER The installed driver is not compatible with the library.

    You mentioned that with FlyCap GUI you are able to apply the configuration and run the camera in trigger mode? can you attach GUI snapshot, for example, the one you attached in the begining shows you are running in Mode-0, by the way make sure when you running ALC SDK exe file, you must close the FlyCap GUI altogether.


    If a post answers your question, please click on "Verify Answer" button

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.