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. [solved] Using dll results in makefile which will not work
Forum Updated to NodeBB v4.3 + New Features

[solved] Using dll results in makefile which will not work

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.8k Views 1 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.
  • R Offline
    R Offline
    rubikon
    wrote on last edited by
    #1

    I created a minimal Qt Widget project with the wizard. Then I copied the folder with the dll and lib I want to use to my project folder.

    After that I added the lib to my pro file. This looks like this:

    @
    QT += core gui

    LIBS += -L "E:/QtProjects/Test_Import01/FTDI/i386" -lftd2xx

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = Test_Import01
    TEMPLATE = app

    INCLUDEPATH += "."

    SOURCES += main.cpp
    dialog.cpp

    HEADERS += dialog.h

    FORMS += dialog.ui
    @

    After I start compiling I get this error
    @:-1: error: LNK1146: no argument specified with option '/LIBPATH:'@

    After looking in the make.debug file I noticed that there is an space between /LIBPATH: and the path of ftd2xx (E:/QtProjects...) in the LIBS line.

    @LIBS = qtmaind.lib /LIBPATH: E:/QtProjects/Test_Import01/FTDI/i386 ftd2xx.lib /LIBPATH:C:\Qt\Qt5\5.1.0\msvc2010\lib C:\Qt\Qt5\5.1.0\msvc2010\lib\Qt5Widgetsd.lib C:\Qt\Qt5\5.1.0\msvc2010\lib\Qt5Guid.lib C:\Qt\Qt5\5.1.0\msvc2010\lib\Qt5Cored.lib libEGLd.lib libGLESv2d.lib gdi32.lib user32.lib @

    If I remove this space, save the file and recompile, everything works fine. Is this a bug or am I doing something wrong?

    I'm using Qt 5.1.0 with MSVC2010.

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

      Hi,

      No it's not a bug, the correct syntax is to have the path appended to -L without any space.

      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
      • R Offline
        R Offline
        rubikon
        wrote on last edited by
        #3

        That's it...

        Thank you!

        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