Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Qt Plugins: :-1: error: cannot find -lpnp_basictools : UPDATE with .pro files

Qt Plugins: :-1: error: cannot find -lpnp_basictools : UPDATE with .pro files

Scheduled Pinned Locked Moved 3rd Party Software
4 Posts 2 Posters 5.5k 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.
  • T Offline
    T Offline
    tryRevilo
    wrote on last edited by
    #1

    Re: Qt Plugins: :-1: error: cannot find -lpnp_basictools

    I have been trying for days now to use third party libraries in my simple Qt projects, but to no success so far.

    I have tried the Plug & Paint Example and the Plug & Paint Basic Tools Example. The tools/plugandpaint/plugins/basictools/basictools.pro compiles OK, but the tools/plugandpaint/app/app.pro fails to compile:

    :-1: error: cannot find -lpnp_basictools
    collect2.exe:-1: error: error: ld returned 1 exit status
    

    I have practically copy-pasted the sources from the website to my computer. What could I be missing.

    Windows 10

    Qt Creator 3.6.0

    Based on Qt 5.5.1 (MSVC 2013, 32 bit)
    Built on Dec 15 2015 01:01:38
    From revision b52c2f91f5

    LIBS += your_lib_path/your_lib linux:LIBS += -L your_lib_path -lyour_lib win32:LIBS += your_lib_path/your_lib LIBS += -L lib/pcsc/ -lpcsclite LIBS += lib/pcsc/libpcsclite.a 2.add headers INCLUDEPATH += your_include_path INCLUDEPATH += . /usr/local/include)
    

    app.pro

    TARGET = plugandpaint
    DESTDIR = ..
    
    QT += widgets
    
    HEADERS        = interfaces.h \
                     mainwindow.h \
                     paintarea.h \
                     plugindialog.h
    SOURCES        = main.cpp \
                     mainwindow.cpp \
                     paintarea.cpp \
                     plugindialog.cpp
    
    LIBS           = -L../plugins -lpnp_basictools
    
    if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
       mac:LIBS = $$member(LIBS, 0) $$member(LIBS, 1)_debug
       win32:LIBS = $$member(LIBS, 0) $$member(LIBS, 1)d
    }
    
    # install
    target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/plugandpaint
    INSTALLS += target
    
    CONFIG += install_ok  # Do not cargo-cult this!
    

    basictoolsplugin.pro

    TEMPLATE      = lib
    CONFIG       += plugin static
    QT           += widgets
    INCLUDEPATH  += ../../app
    HEADERS       = basictoolsplugin.h
    SOURCES       = basictoolsplugin.cpp
    TARGET        = $$qtLibraryTarget(pnp_basictools)
    DESTDIR       = ../../plugins
    
    # install
    target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/plugandpaint/plugins
    INSTALLS += target
    
    CONFIG += install_ok  # Do not cargo-cult this!**bolded text**
    
    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi

      • use third party libraries

      Those are normally NOT Qt plugins but so/dll files ?

      http://doc.qt.io/qt-5/third-party-libraries.html

      Are you trying to make a Qt plugin that uses a external "LIB" ?

      T 1 Reply Last reply
      3
      • mrjjM mrjj

        Hi

        • use third party libraries

        Those are normally NOT Qt plugins but so/dll files ?

        http://doc.qt.io/qt-5/third-party-libraries.html

        Are you trying to make a Qt plugin that uses a external "LIB" ?

        T Offline
        T Offline
        tryRevilo
        wrote on last edited by
        #3

        @mrjj Hi. Thank you for the response. Why is my implementation not working?

        mrjjM 1 Reply Last reply
        0
        • T tryRevilo

          @mrjj Hi. Thank you for the response. Why is my implementation not working?

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

          @tryRevilo

          Hi
          Im not sure what you are building. If its just a normal Qt plugin and there is no third party libraries also then
          most likely, this is not true

          LIBS = -L../plugins -lpnp_basictools

          it says that from the .pro and one step back there is plugins folder and in that folder
          it can find the plugin called pnp_basictools
          This must be true. The file must be placed there and in that path.

          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