Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Why Qt Creator gives "No absolute path for library" Error for a known library?
Qt 6.11 is out! See what's new in the release blog

Why Qt Creator gives "No absolute path for library" Error for a known library?

Scheduled Pinned Locked Moved Qt Creator and other tools
13 Posts 6 Posters 4.5k Views 2 Watching
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi I am using an industrial machine vision camera (Basler) in a Qt based project. I work under linux Ubuntu 12.04 64 bit and Qt 4.8

    I have set $LD_LIBRARY_PATH and all the required environment variables to find the camera libraries but Still Qt creator gives error when wants to run my application. it gives the following error:

     "No absolute path for '/opt/GenICam_v2_3/bin/Linux64_x64/GenApi/Generic/libXMLLoader_gcc40_v2_3.so'"
    

    it is amazing that when I run my Qt project from the Ubuntu terminal it runs without any problem but When I want to run it from the Qt creator it gives the above error message. why Qt creator fails to find the library path ?
    This path is not a valid path in my machine and I don't have such a folder "/opt/GenICam_v2_3" in my machine, and I don't know why Qt insists on creating such folder.

    I used the ldd command for my application and all the libraries was found So I'm sure that nothing is missing.

    Is there anything else that I have forget to set before I could run it in Qt Creator ? Why such a phantom location is necessary for Qt Creator ?

    I tried to put my libXMLLoader_gcc40_v2_3.so which is in another place to the above location but it gives another error message in Qt creator :

    "Environment variable 'GENICAM_ROOT_V2_3' not found" 
    

    I have set this environment variable in /etc/bash.bashrc so I'm sure I've declared it but still Qt Creator cannot find it too.

    Content of bash.bashrc
    @
    "export PYLON_ROOT=/opt/pylon4"
    "export GENICAM_ROOT_V2_3=${PYLON_ROOT}/genicam"
    "export GENICAM_CACHE_V2_3=$HOME/genicam_xml_cache"
    "export LD_LIBRARY_PATH=${PYLON_ROOT}/lib64:${GENICAM_ROOT_V2_3}/bin/Linux64_x64:${GENICAM_ROOT_V2_3}/bin/Linux64_x64/GenApi/Generic:$LD_LIBRARY_PATH"
    @

    I copied all the above information to .bashrc in the home directory too.

    What should I do to run my application in Qt creator because I need to debug my application and in Ubuntu terminal I cannot do such thing easily.

    Thanks

    [edit: added missing coding tags @ SGaist]

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi,
      where libXMLLoader_gcc40_v2_3.so from? In my case i'm copied library from Windows to Linux and have same problem=).

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        After updating bashrc, did you source it ? Or logged out and in again ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          Hi SGaist

          Thanks for your response. yes I logged out and rebooted the operating system so many times but nothing happened. this project could be run in Ubuntu terminal so it confirms that bashrc is okay.

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            try LIBS+=-L$$LOCATION_YOUR_LIB -lNameOfYourLib
            link: http://qt-project.org/doc/qt-4.8/qmake-project-files.html#declaring-other-libraries

            1 Reply Last reply
            0
            • ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #6

              Dear ningen I've done this and as I told you earlier the project compile successfully so it shows all the libraries are loaded.
              My .pro file contains all the header and shared library information about my camera.

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by
                #7

                are you trying rm *.pro.user?

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by
                  #8

                  yes I tried that too .. :((

                  I think there might be an internal problem with the camera library !!

                  Since I've never seen something like that before !

                  but I don't know why it could be run in the Ubuntu terminal

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Did you check the environment variables in the Run part of the Project panel ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • ? Offline
                      ? Offline
                      A Former User
                      wrote on last edited by
                      #10

                      yes, the LD_LIBRARY_PATH is exactly the same as the value I've set in the bashrc file.

                      Is there any need to add other environment variables which I've set in the bashrc to the evironment variables of the Run part ?

                      because the first error is not concern with the unknown environment variables !

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        Do you have GENICAM_ROOT_V2_3 and friends in the list of known variables ?

                        IIRC, pylon needs them to work correctly

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • P Offline
                          P Offline
                          Pal_ani
                          wrote on last edited by
                          #12

                          @Par3a were you able to solve the problem? I have a similar issue.

                          mrjjM 1 Reply Last reply
                          0
                          • P Pal_ani

                            @Par3a were you able to solve the problem? I have a similar issue.

                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            @Pal_ani
                            Hi and welcome to the forums
                            The poster has not been online since 2015 so its not likely he will answer.
                            So if you get no answers, you should open a new ticket with information and
                            error messages about your "similar issue."

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved