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: 2410

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.

  • In reply to Sanjeev:

    Hi Sanjeev,

    I have attached the screenshot of the trigger settings below. Also the FlyCap software was closed but I'm still getting the PG_FLYCAP_C_ GET_STROBE_FAILED error. I have attached a screenshot of the application output below.

  • In reply to Sidharth Makhija:

    Sidharth,
    Can you attach Point Grey reference pdf file? I still see that pixelFormat is showing some junk value, are you by any chance printing pointer address.
    Unfortunately it is taking very long time, since we don't have similar hardware setup as yours it will be difficult.
    Regards,
    Sanjeev

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

  • In reply to Sanjeev:

    Hi Sanjeev,

    I'm printing the values in the following way:

                std::cout<<"format7_settings_new.pixelFormat = "<<format7_settings_new.pixelFormat<<std::endl;
                std::cout<<"FC2_PIXEL_FORMAT_MONO8 = "<<FC2_PIXEL_FORMAT_MONO8<<std::endl;

    I'm not sure if these are the pointer address. Earlier when the camera_error=22 was present the pixelFormat was a different value. After forcing it to MONO8 it shows the same value as MONO8. I did this using:

    format7_settings_new.pixelFormat = FC2_PIXEL_FORMAT_MONO8;

    which is the same way as in the switch case statement above it in the code.  The original implementation is as follows:

        // case PixelFormat::MONO8:
            // format7_settings_new.pixelFormat = FC2_PIXEL_FORMAT_MONO8;
            // break;

    After changing that the error 22 was resolved. I'm not sure what the value for the FC2_PIXEL_FORMAT_MONO8 should be. Without forcing it to MONO8 the format7_settings_new.pixelFormat value is 4194304.

    I'm referring to the FlyCapture2Defs_C.h file in the SDK. The errors list is the same as the one you posted in the previous comment and the  FC2_PIXEL_FORMAT_MONO8; is initialized as follows in that file:

        typedef enum _fc2PixelFormat
        {
            FC2_PIXEL_FORMAT_MONO8            = 0x80000000, /**< 8 bits of mono information. */
            FC2_PIXEL_FORMAT_411YUV8        = 0x40000000, /**< YUV 4:1:1. */
            FC2_PIXEL_FORMAT_422YUV8        = 0x20000000, /**< YUV 4:2:2. */
            FC2_PIXEL_FORMAT_444YUV8        = 0x10000000, /**< YUV 4:4:4. */
            FC2_PIXEL_FORMAT_RGB8            = 0x08000000, /**< R = G = B = 8 bits. */
            FC2_PIXEL_FORMAT_MONO16            = 0x04000000, /**< 16 bits of mono information. */
            FC2_PIXEL_FORMAT_RGB16            = 0x02000000, /**< R = G = B = 16 bits. */
            FC2_PIXEL_FORMAT_S_MONO16        = 0x01000000, /**< 16 bits of signed mono information. */
            FC2_PIXEL_FORMAT_S_RGB16        = 0x00800000, /**< R = G = B = 16 bits signed. */
            FC2_PIXEL_FORMAT_RAW8            = 0x00400000, /**< 8 bit raw data output of sensor. */
            FC2_PIXEL_FORMAT_RAW16            = 0x00200000, /**< 16 bit raw data output of sensor. */
            FC2_PIXEL_FORMAT_MONO12            = 0x00100000, /**< 12 bits of mono information. */
            FC2_PIXEL_FORMAT_RAW12            = 0x00080000, /**< 12 bit raw data output of sensor. */
            FC2_PIXEL_FORMAT_BGR            = 0x80000008, /**< 24 bit BGR. */
            FC2_PIXEL_FORMAT_BGRU            = 0x40000008, /**< 32 bit BGRU. */
            FC2_PIXEL_FORMAT_RGB            = FC2_PIXEL_FORMAT_RGB8, /**< 24 bit RGB. */
            FC2_PIXEL_FORMAT_RGBU            = 0x40000002, /**< 32 bit RGBU. */
            FC2_PIXEL_FORMAT_BGR16            = 0x02000001, /**< R = G = B = 16 bits. */
            FC2_PIXEL_FORMAT_BGRU16            = 0x0sed stream. */
            FC2_NUM_PIXEL_FORMATS            =  20, /**< Number of pixel formats. */
            FC2_UNSPECIFIED_PIXEL_FORMAT    = 0 /**< Unspecified pixel format. */

        } fc2PixelFormat;

  • In reply to Sidharth Makhija:

    Hi Sidharth,

    Try each pixel option and let me know what kind of errors you are seeing, also when you run the Flycap2 GUI software, send me the snapshot of each one when you are able to configure and run as shown below.

    Regards,

    Sanjeev

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

  • In reply to Sanjeev:

    Hi Siddharth,

    Do you still require the answer to your query? I'm tentatively closing this thread due to inactivity. You can reopen this if required.
    Thanks for your interest in DLP Technology.

    Regards,
    Hirak.
  • In reply to Hirak Biswas:

    Hi,

    The PointGrey support mentinoed that by default the strobe is enabled on GPIO1 (white) on both Flea3 and BFLY cameras. Referring to the BlackFly GPIO pinouts here ,there is only optosiolated GPIO pins. Is the TI DLP software trying to enable strobe on one of the non-isolated IOs on the Flea3? This might be the cause of the error that is ocurring now. Could you please confirm the strobe pin setting that is being done in the code in the SDK? Thank you.

    Regards,

    Sidharth Makhija

  • In reply to Sidharth Makhija:

    Hi Sidharth,

    Our SDK never directly operated on the GPIOs of the camera; all the settings would be made via PointGrey FlyCap2 API calls, please note that this code is already working on Flea3 USB camera models we have used Windows 7 OS during that time. 

    Please refer to the ReturnCode PG_FlyCap2_C::Setup(const dlp::Parameters &settings) API is the SDK, and note that we are failing at Format7 setting fc2SetFormat7Configuration() and the Trigger Settings happens at later point of time, fc2SetTriggerMode() and fc2SetStrobe().

    You can ask PointGrey to send sample code which can demonstrate the configuration on the BlackFly model in Format7 mode, compile that code and make sure it works, then you can port that code into DLP SDK in the PG_FlyCap2_C::Setup() function.

    Let us know if it helps.

    Regards,

    Sanjeev

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

  • In reply to Sanjeev:

    Hi Sidharth,

    Do you still need the answer to your query? If not we'll be tentatively closing this thread. You can reopen by replying to this thread anytime.

    Thanks & Regards
    Hirak.

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.