简体   繁体   English

错误:无法在Qt Windows8上打开文件'boost_atomic-vc120-mt-1_58.lib'boost libs

[英]error: cannot open file 'boost_atomic-vc120-mt-1_58.lib' boost libs on Qt Windows8

I am trying to build link boost library with Qt creator on windows. 我正在尝试在Windows上使用Qt Creator创建链接增强库。 And I have downloaded boost prebuilt library compiled with msvc-12.0. 而且我已经下载了使用msvc-12.0编译的boost预构建库。

In my .pro file I have added 在我的.pro文件中,我添加了

INCLUDEPATH += C:/local/boost_1_58_0/boost
LIBS += "-LC:/local/boost_1_58_0/stage/lib" -lboost_atomic-vc120-mt-1_58

But while building the project I am getting the error error: LNK1104: cannot open file 'boost_atomic-vc120-mt-1_58.lib' 但是在构建项目时出现错误error: LNK1104: cannot open file 'boost_atomic-vc120-mt-1_58.lib'

My Qt version is Desktop Qt 5.4.1 MSVC2013 64bit 我的Qt版本是Desktop Qt 5.4.1 MSVC2013 64bit

And the compiler list showing 并且编译器列表显示

在此处输入图片说明

I have downloaded boost library from http://sourceforge.net/projects/boost/files/boost-binaries/1.58.0/ 我已经从http://sourceforge.net/projects/boost/files/boost-binaries/1.58.0/下载了Boost库

and I choose boost_1_58_0-msvc-12.0-64.exe as I am using msvc-2013 as my compiler. 我选择了boost_1_58_0-msvc-12.0-64.exe因为我将msvc-2013用作编译器。

Edit: Compile output 编辑:编译输出

cl : Command line warning D9002 : ignoring unknown option '-lvda'
    cl -c -nologo -Zm200 -Zc:wchar_t -FS -lvda -Zi -MDd -GR -W3 -w34100 -w34189 -EHsc /Fddebug\AcessControl-V1.pdb -DUNICODE -DWIN32 -DWIN64 -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I"..\AcessControl-V34-DVR" -I"." -I"..\AcessControl-V24\ffmpeg\include" -I"C:\local\boost_1_58_0\boost" -I"C:\Qt\Qt5.4.1\5.4\msvc2013_64\include" -I"C:\Qt\Qt5.4.1\5.4\msvc2013_64\include\QtQuick" -I"C:\Qt\Qt5.4.1\5.4\msvc2013_64\include\QtWidgets" -I"C:\Qt\Qt5.4.1\5.4\msvc2013_64\include\QtGui" -I"C:\Qt\Qt5.4.1\5.4\msvc2013_64\include\QtANGLE" -I"C:\Qt\Qt5.4.1\5.4\msvc2013_64\include\QtQml" -I"C:\Qt\Qt5.4.1\5.4\msvc2013_64\include\QtNetwork" -I"C:\Qt\Qt5.4.1\5.4\msvc2013_64\include\QtSql" -I"C:\Qt\Qt5.4.1\5.4\msvc2013_64\include\QtCore" -I"debug" -I"C:\Qt\Qt5.4.1\5.4\msvc2013_64\mkspecs\win32-msvc2013" -Fodebug\ @C:\Users\vapplica\AppData\Local\Temp\moc_alert.obj.5536.20297.jom
moc_alert.cpp
cl : Command line warning D9002 : ignoring unknown option '-lvda'
    link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\AcessControl-V1.exe @C:\Users\vapplica\AppData\Local\Temp\AcessControl-V1.exe.5536.23406.jom
LINK : fatal error LNK1104: cannot open file 'boost_atomic-vc120-mt-1_58.lib'
jom: E:\Qt_Project\AcessControl-V34\Makefile.Debug [debug\AcessControl-V1.exe] Error 1104
jom: E:\Qt_Project\AcessControl-V34\Makefile [debug] Error 2
16:52:42: The process "C:\Qt\Qt5.4.1\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project AcessControl-V1 (kit: Desktop Qt 5.4.1 MSVC2013 64bit)
When executing step "Make"
16:52:42: Elapsed time: 00:24.

Does any one know why this error occurs? 有谁知道为什么会发生此错误?

Any help will be appreciated 任何帮助将不胜感激

Thanks Haris 谢谢哈里斯

In your pro file change INCLUDE and LIBS directives: 在您的专业文件中,更改INCLUDELIBS指令:

INCLUDEPATH += C:/local/boost_1_58_0
LIBS += -LC:/local/boost_1_58_0/stage/lib

Make shore that .lib files in C:/local/boost_1_58_0/stage/lib directory. .lib文件放在C:/local/boost_1_58_0/stage/lib目录中。 Also make shore that header files in C:/local/boost_1_58_0/boost directory. 还应将头文件放在C:/local/boost_1_58_0/boost目录中。 You need add C:/local/boost_1_58_0 to INCLUDEPATH for be able to write #include <boost/...> in your program. 您需要在INCLUDEPATH添加C:/local/boost_1_58_0 ,以便能够在程序中编写#include <boost/...>

By default boost use auto-linking. 默认情况下,boost使用自动链接。 You do not need to indicate library name. 您无需指明库名。 If you want disable auto-linking specify BOOST_ALL_NO_LIB for preprocessor. 如果要禁用自动链接, BOOST_ALL_NO_LIB为预处理程序指定BOOST_ALL_NO_LIB

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Buidling提升错误:名称冲突&#39; <pstage\\lib> boost_system-VC120-MT-1_58.dll” - Buidling boost error: Name clash for '<pstage\lib>boost_system-vc120-mt-1_58.dll' 无法在VS 2013 C ++项目中打开文件&#39;libboost_log-vc120-mt-1_58.lib&#39; - cannot open file 'libboost_log-vc120-mt-1_58.lib' in VS 2013 C++ project VS12 Buiding Boost Library致命错误LNK1104:无法打开文件&#39;libboost_system-vc110-mt-gd-1_58.lib&#39; - VS12 Buiding Boost Library fatal error LNK1104: cannot open file 'libboost_system-vc110-mt-gd-1_58.lib' Boost.Python和错误LNK1104:无法打开文件'boost_python-vc100-mt-gd-1_55.lib' - Boost.Python and error LNK1104: cannot open file 'boost_python-vc100-mt-gd-1_55.lib' 链接:致命错误 LNK1104:无法打开文件 'boost_date_time-vc141-mt-1_65_1.lib' - LINK : fatal error LNK1104: cannot open file 'boost_date_time-vc141-mt-1_65_1.lib' 继续收到“错误LNK1104:无法打开文件&#39;boost_thread-vc100-mt-gd-1_41.lib” - Keep getting “error LNK1104: cannot open file 'boost_thread-vc100-mt-gd-1_41.lib” Boost c ++ LNK1104无法打开文件&#39;libboost_serialization-vc140-mt-gd-1_62.lib&#39;错误 - Boost c++ LNK1104 cannot open file 'libboost_serialization-vc140-mt-gd-1_62.lib' error 无法打开文件&#39;boost_python36-vc141-mt-gd-x64-1_68.lib&#39; - cannot open file 'boost_python36-vc141-mt-gd-x64-1_68.lib' Boost无法打开文件&#39;libboost_filesystem-vc100-mt-gd-1_47.lib&#39; - Boost cannot open file, 'libboost_filesystem-vc100-mt-gd-1_47.lib' LNK1104 无法打开文件 boost_thread-vc140-mt-gd-1_61.lib - LNK1104 cannot open file boost_thread-vc140-mt-gd-1_61.lib
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM