C++ 致命错误LNK1104:无法打开文件'libboost_regex-vc90-mt-1_47.lib'

C++ 致命错误LNK1104:无法打开文件'libboost_regex-vc90-mt-1_47.lib',c++,boost,cmake,C++,Boost,Cmake,我已成功构建Boost.CMake并将.lib文件放入build/lib目录。但这些都不符合正确的惯例。所以我犯了一个错误。我怎样才能解决这个问题 ------ Rebuild All started: Project: Test, Configuration: Release Win32 ------ Deleting intermediate and output files for project 'Test', configuration 'Release|Win32' Compilin

我已成功构建Boost.CMake并将.lib文件放入build/lib目录。但这些都不符合正确的惯例。所以我犯了一个错误。我怎样才能解决这个问题

------ Rebuild All started: Project: Test, Configuration: Release Win32 ------
Deleting intermediate and output files for project 'Test', configuration 'Release|Win32'
Compiling...
Main.cpp
Linking...
LINK : fatal error LNK1104: cannot open file 'libboost_regex-vc90-mt-1_47.lib'
Build log was saved at "file://c:\Users\Chameera\Documents\Visual Studio 2008\Projects\Test\Test\Release\BuildLog.htm"
Test - 1 error(s), 0 warning(s)

========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

错误是因为编译器找不到libboost_regex-vc90-mt-1_47.lib,它是boost中的正则表达式库。如果您已经拥有该库,请添加到库目录,如果没有,请构建库。如何。

libboost_regex-vc90-mt-1_47.lib是否在库路径中?这是一个32位库吗?我只想通过CMakeList.txt自己进行重命名。它可能吗?@Chameera我非常了解CMake,因为我多年来在所有项目中都使用它——是的,其中一些项目使用boost和Visual Studio。然而,你的最后一个问题对我来说毫无意义。你想提供一个不同版本的boost libraray吗?您是否更改了命名约定?@drescherjm在使用CMA生成Boost后生成名为Boost_regex-vc90-mt-1_47.lib的lib文件。如何将其重命名为正确的名称?我已经使用Cmake构建了Boost。所以实际的构建库文件名是boost_regex-vc90-mt-1_47.lib。如何管理它?似乎您正在使用CMake,请在您的CMakeLists.txt中放置以下两行:link\u directories您的\u LIB\u文件\u PATH target\u link\u libraries您的\u输出您的\u LIB\u文件,如果LIB文件名不匹配,请重命名它。