Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. :-1: error: cannot find -lPythonQt-Qt5-Python3.8_d

:-1: error: cannot find -lPythonQt-Qt5-Python3.8_d

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 2 Posters 534 Views
  • 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.
  • D Offline
    D Offline
    devillIsHeree
    wrote on last edited by
    #1

    I am trying to use PythonQt in my Qt c++ application to embed python script in my application, I have build the PythonQt successfully in my system and also tested all it's examples and they all are working perfectly but when I tried to use it with my application it gives me following error.

    :-1: error: cannot find -lPythonQt-Qt5-Python3.8_d

    JonBJ 1 Reply Last reply
    0
    • D devillIsHeree

      I am trying to use PythonQt in my Qt c++ application to embed python script in my application, I have build the PythonQt successfully in my system and also tested all it's examples and they all are working perfectly but when I tried to use it with my application it gives me following error.

      :-1: error: cannot find -lPythonQt-Qt5-Python3.8_d

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @devillIsHeree said in :-1: error: cannot find -lPythonQt-Qt5-Python3.8_d:

      -lPythonQt-Qt5-Python3.8_d

      Purely at a guess, is that _d suffix for a debug library and you don't have that? Have a search on your disk, do you have any similarly-named library at all?

      1 Reply Last reply
      1
      • D Offline
        D Offline
        devillIsHeree
        wrote on last edited by
        #3

        What do you mean by similar named library? @JonB

        JonBJ 1 Reply Last reply
        0
        • D devillIsHeree

          What do you mean by similar named library? @JonB

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @devillIsHeree
          Any file at all with PythonQt-Qt5-Python3.8 (without the _d) in it, just to see what you have, e.g.

          • Linux: locate 'PythonQt-Qt5-Python3.8'
          • Windows: dir/s/b C:\ | findstr "PythonQt-Qt5-Python3.8"
          1 Reply Last reply
          1
          • D Offline
            D Offline
            devillIsHeree
            wrote on last edited by
            #5

            @JonB I have ubuntu, I have run your provided command, It is showing me those results

            /usr/lib/libPythonQt-Qt5-Python3.8.so
            /usr/lib/libPythonQt-Qt5-Python3.8.so.3
            /usr/lib/libPythonQt-Qt5-Python3.8.so.3.2
            /usr/lib/libPythonQt-Qt5-Python3.8.so.3.2.0
            
            
            JonBJ 1 Reply Last reply
            0
            • D devillIsHeree

              @JonB I have ubuntu, I have run your provided command, It is showing me those results

              /usr/lib/libPythonQt-Qt5-Python3.8.so
              /usr/lib/libPythonQt-Qt5-Python3.8.so.3
              /usr/lib/libPythonQt-Qt5-Python3.8.so.3.2
              /usr/lib/libPythonQt-Qt5-Python3.8.so.3.2.0
              
              
              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              @devillIsHeree
              Which is what I kind of wondered might show up. But as I said your error message, assuming you copy/pasted it, reads:

              -lPythonQt-Qt5-Python3.8_d

              If it read -lPythonQt-Qt5-Python3.8 it would link against those libraries you do have. But it has that trailing _d, so will not. Which I suspect is something to do with wanting a debug version of the library. Which you don't have.

              So have a look at wherever that line comes from. Is it supposed to be debug? Are you supposed to download/install a debug version of this PythonQt library?

              1 Reply Last reply
              1
              • D Offline
                D Offline
                devillIsHeree
                wrote on last edited by devillIsHeree
                #7

                @JonB Actually I had install PythonQt to use the python embedding in Qt c++, This line is coming from the file
                PythonQt.prf. This is the link to that file https://github.com/MeVisLab/pythonqt/blob/master/build/PythonQt.prf

                @JonB and I just watnt o use that PythonQt in my code, It is PythonQt only which wanted to have that debug file I suppose but I don't know how to resolve this Please help

                JonBJ 1 Reply Last reply
                0
                • D devillIsHeree

                  @JonB Actually I had install PythonQt to use the python embedding in Qt c++, This line is coming from the file
                  PythonQt.prf. This is the link to that file https://github.com/MeVisLab/pythonqt/blob/master/build/PythonQt.prf

                  @JonB and I just watnt o use that PythonQt in my code, It is PythonQt only which wanted to have that debug file I suppose but I don't know how to resolve this Please help

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by JonB
                  #8

                  @devillIsHeree said in :-1: error: cannot find -lPythonQt-Qt5-Python3.8_d:

                  https://github.com/MeVisLab/pythonqt/blob/master/build/PythonQt.prf

                  Yes, and I see that has:

                  # check if debug or release
                  CONFIG(debug, debug|release) {
                    DEBUG_EXT = _d 
                  } else {
                    DEBUG_EXT = 
                  }
                  ...
                  unix: LIBS += -L$$DESTDIR/../lib -lPythonQt-Qt5-Python$${PYTHON_VERSION}$${DEBUG_EXT}
                  

                  So either don't build for debug/get rid of using the DEBUG_EXT = _d under Linux at least, or somewhere (presumably) you can fetch (or build) the Linux debug libraries with _d on them.

                  1 Reply Last reply
                  1
                  • D Offline
                    D Offline
                    devillIsHeree
                    wrote on last edited by
                    #9

                    Thanks @JonB sir, I just remove all the DEBUG_ext line
                    so now my all ```.prf.. files look like that

                    CONFIG(debug, debug|release) {
                      DEBUG_EXT =
                    } else {
                      DEBUG_EXT = 
                    }
                    

                    and they're compiling well. Thanks for the help

                    1 Reply Last reply
                    1

                    • Login

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