Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Solved [solved] error: undefined reference to '\_imp__is_InitCamera'*

    General and Desktop
    qt ueye
    2
    3
    1565
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pbdot last edited by pbdot

      Hi,

      I am trying to grab an image from an uEye ethernet camera.

      In the project .pro file, I've added INCLUDEPATH and LIBS to point to where the location of the uEye SDK is:

      INCLUDEPATH += "C:\Program Files\IDS\uEye\Develop\include"
      LIBS += -L"C:\Program Files\IDS\uEye\Develop\Lib" -uEye_api -uEye_tools
      

      In my code, I added:

      #include "uEye.h"
      
      HIDS hCam = 1;
      printf("Success-Code: %d\n",IS_SUCCESS);
      INT nRet = is_InitCamera(&hCam, NULL);
      

      When I tried to compile, Qt Creator complains that: mainwindow.cpp:27: error: undefined reference to '_imp__is_InitCamera'
      Strange that I was typing the line is_, the IDE auto-complete the syntax to is_InitCamera.

      What did I do wrong?

      1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion last edited by

        Change
        LIBS += -L"C:\Program Files\IDS\uEye\Develop\Lib" -uEye_api -uEye_tools
        to
        LIBS += -L"C:\Program Files\IDS\uEye\Develop\Lib" -lEye_api -lEye_tools

        And you should avoid to use paths containing blanks: it often cause problems.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • P
          pbdot last edited by

          Thanks, that fixed it!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post