Including/linking issue

  • Hello!

    I'm using NVIDIA Jetson TK1 OS:Ubuntu, IDE:QtCreator, i'm programming in c++ and i'm also using OpenCV. My goal is to be able to capture pictures with my Basler GigE camera. I downloaded the Basler Pylon SDK for ARM and followed the install instructions. I've also set up the environment variables. After ive done that i ran a sample that came with the SDK and it worked fine. Then i attempted to implement the Pylon libraries into a Qt project, so i could capture frames within my code, but what i get is the following:

    The programmer's guide that came with Pylon tells me to do the following:

    • the $PYLON_ROOT/bin/ shell script sets up the environment *

    I've done that, and checked it using the env command in terminal

    *Add the following include directories in your make file:
    -I"$(PYLON_ROOT)/include" -I"$(PYLON_GENICAM_ROOT)/library/CPP/include"

    Add the following library directories in your make file:
    -L"$(PYLON_ROOT)/lib" -L"$(PYLON_GENICAM_ROOT)/library/CPP/lib/Linux32_i86"*
    NOTE: Linux32_i86 is replaced by Linux32_ARM in my case..

    I'm not quite confident i've done that correctly. I've added the include directories using the INCLUDEPATH+=... in .pro file and i've added the libraries using the LIBS+=...
    in the main.cpp i've added the following lines:
    #include <pylon/PylonIncludes.h>
    using namespace Pylon;
    and in function main:
    Pylon::PylonAutoInitTerm autoInitTerm;

    I should say that i'm quite new to all this, so excuse me if it's a dumb question but i cant seem to get past it without any help :)

    Thank you in advance

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You should use

    LIBS += -lopencv_core \
        -lopencv_XXX \

    here it's a lowercase L, uppercase L is more adding additional search paths for the linker and lowercase L is for telling the linker which lib it should use.

    From your errors in looks like you are not linking to the genicam libraries

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.