简体   繁体   中英

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. 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.

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...

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). 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". With that fixed, it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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