简体   繁体   English

链接到Boost错误

[英]Linking with Boost error

I just downloaded and ran the boost installer for version 1.42 (from boostpro.com), and set up my project according to the getting started guide. 我刚刚下载并运行了1.42版的boost安装程序(来自boostpro.com),并根据入门指南设置了我的项目。 However, when I build the program, I get this linker error: 但是,在生成程序时,出现此链接器错误:

LINK : fatal error LNK1104: cannot open file 'libboost_program_options-vc90-mt-gd-1_42.lib' 

The build log adds this (I've replaced project-specific paths with *'s): 构建日志将添加以下内容(我已将项目特定的路径替换为*):

Creating temporary file "******\Debug\RSP00001252363252.rsp" with contents
[
/OUT:"*********.exe" /INCREMENTAL /LIBPATH:"C:\Program Files\boost\boost_1_42_0\lib" /MANIFEST /MANIFESTFILE:"Debug\hw6.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"********\Debug\***.pdb" /SUBSYSTEM:CONSOLE /DYNAMICBASE /NXCOMPAT /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib

".\Debug\****.obj"

".\Debug\****.exe.embed.manifest.res"
]
Creating command line "link.exe @********\Debug\RSP00001252363252.rsp /NOLOGO /ERRORREPORT:PROMPT"

I've also emailed info@boostpro.com (with a message very similar to this), but I thought maybe so would be faster. 我也通过电子邮件发送至info@boostpro.com(带有与此非常相似的消息),但我认为这样可能会更快。

EDIT: Yes, I checked if the file was there before asking this question, and yes, it's path is in the linker properties, under "Additional Library Directories" (I've tried with and without quotes). 编辑:是的,在问这个问题之前,我检查了文件是否在那里,是的,它的路径在链接器属性的“其他库目录”下(我尝试使用带引号和不带引号)。

EDIT 2: And it definitely sees the path because it appears in the 3rd line of the build log... 编辑2:它肯定会看到路径,因为它出现在生成日志的第三行中...

EDIT 4: Nevermind, it doesn't work in release mode or debug mode, but the file that doesn't work changes appropriately (same when I change the runtime library to a different type of multithreaded - I don't see single-threaded as an option, although it would work for me). 编辑4:没关系,它不能在发布模式或调试模式下工作,但是不能正常工作的文件会进行适当的更改(就像我将运行时库更改为其他类型的多线程一样-我看不到单线程作为一种选择,尽管它对我有用)。 Trying command line now. 现在尝试命令行。

There's a slight difference between the documentation and my actual installation. 文档和实际安装之间有细微的差别。 Where the documentation has "boost_1_42_0" in the path, the installer made my path "boost_1_42". 如果文档的路径中包含“ boost_1_42_0”,则安装程序会将我的路径设置为“ boost_1_42”。 With that fixed, it works. 修复该问题后,它可以工作。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM