我想要做的是正确地将Boost安装到Qt中,以便我可以在任何Qt程序中使用它。
然而,目前正在建设失败的问题:
cannot find /: Permission denied
error: ld returned 1 exit status
编译器输出:
12:55:12: Running steps for project boostQtExample...
12:55:12: Configuration unchanged, skipping qmake step.
12:55:12: Starting: "C:\Qt\Qt5.4.1\Tools\mingw491_32\bin\mingw32-make.exe"
C:/Qt/Qt5.4.1/Tools/mingw491_32/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Users/Nick.CSM3D/Downloads/build-boostQtExample-Desktop_Qt_5_4_1_MinGW_32bit-Debug'
g++ -Wl,-subsystem,windows -mthreads -o debug\boostQtExample.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o -lglu32 -lopengl32 -lgdi32 -luser32 -lmingw32 -LC:/Qt/Qt5.4.1/5.4/mingw491_32/lib -lqtmaind -LC:\mingw491\mingw32\lib -LC:\Utils\icu32_53_1_mingw482\lib -LC:\utils\postgresql\pgsql\lib -LC:\utils\mysql\mysql\lib -LC:\opensll\lib -lshell32 -LC:\Qt\Qt5.4.1\5.4\mingw491_32/lib -LC:\releases\lib\boost\boost_qt\stage\lib\ / -lQt5Widgetsd -lQt5Guid -lQt5Cored
C:/Qt/Qt5.4.1/Tools/mingw491_32/bin/../lib/gcc/i686-w64-mingw32/4.9.1/../../../../i686-w64-mingw32/bin/ld.exe: cannot find /: Permission denied
collect2.exe: error: ld returned 1 exit status
Makefile.Debug:81: recipe for target 'debug\boostQtExample.exe' failed
mingw32-make[1]: *** [debug\boostQtExample.exe] Error 1
mingw32-make[1]: Leaving directory 'C:/Users/Nick.CSM3D/Downloads/build-boostQtExample-Desktop_Qt_5_4_1_MinGW_32bit-Debug'
makefile:34: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 2
12:55:15: The process "C:\Qt\Qt5.4.1\Tools\mingw491_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project boostQtExample (kit: Desktop Qt 5.4.1 MinGW 32bit)
When executing step "Make"
通过使用此网站逐步安装http://cpp-qt-mac-win.blogspot.co.uk/2011/10/qt-boost-for-beginners-step-by-step.html?view=mosaic来安装Boost,目前正在使用此页面上的Qt示例来测试我的设置是否正常工作(它不是)。这包括构建库文件,我还在windows中设置了环境变量(C:\ Qt \ 5.4 \ mingw491_32 \ bin; C:\ releases \ lib \ boost \ boost_qt \ stage \ lib)。
#
# Project created by QtCreator 2011-10-24T19:30:35
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = boostQtExample
TEMPLATE = app
#Dont forget to add the path to your boost install folder
INCLUDEPATH += C:\releases\lib\boost\boost_qt
LIBS += -LC:\releases\lib\boost\boost_qt\stage\lib\ \
-lboost_datetime
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
有没有人对我还缺少什么有任何建议?
答案 0 :(得分:0)
将LIBS + = /更改为LIBS + = \解决了这个问题。但是现在只是报告“:-1:错误:找不到-lboost_datetime”。将创建一个新问题来解决这个问题。