1

I have installed qt-opensource-windows-x86-msvc2013_64_opengl-5.4.0.exe and compiled boost_1_58_0.zip with this command: b2 toolset=msvc --build-type=complete stage. It works fine with Visual Studio, but when I try use it with Qt I get this error:

:-1: error: LNK1104: cannot open file 'libboost_filesystem-vc120-mt-gd-1_58.lib'

Here is my .pro file:

TEMPLATE = app

QT += qml quick widgets

SOURCES += main.cpp \ testclass.cpp

RESOURCES += qml.qrc

INCLUDEPATH += C:\boost

LIBS += "-LC:\boost\stage\lib\libboost_filesystem-vc120-mt-gd-1_58.lib"

#Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH =

# Default rules for deployment. include(deployment.pri)

HEADERS += \ testclass.h

T3KBAU5
  • 1,861
  • 20
  • 26
Morteza
  • 73
  • 1
  • 13

1 Answers1

1

In the LIBS variable use just "-L" for correct library path (-L). You made a mix, specifying a file (lowercase l) while libs directory is missing.

You do not need to specify the library, boost has pragmas for that.

marom
  • 5,064
  • 10
  • 14
  • can you write what exactly you mean? – Morteza Jun 11 '15 at 14:27
  • 1
    -L flag specifies a directory where to look for .lib files. -l (lowercse) specifies a library to look for. The latter is not required with boost. Boost libraries have (in include files) some #pragma that tell th ompiler which .lib they require. So with your -L specify just a path, not a file/library – marom Jun 11 '15 at 18:27
  • I don't know what happen but your solution work sometime and when i close qt IDE and reopen that it don't work any more – Morteza Jun 12 '15 at 11:05