致命错误C1083:无法打开包含文件:'boost / config.hpp':没有这样的文件或目录

时间:2022-06-02 20:53:18

I think I did all the necessary configuration but I am still getting this:

我想我做了所有必要的配置,但我仍然得到这个:

Error 1 fatal error C1083: Cannot open include file: 'boost/config.hpp': No such file or directory    File:c:\documents and settings\administrator\my documents\visual studio 2008\libs\boost_1_43_0\boost\smart_ptr\shared_ptr.hpp Line:17

Here are screenshots of setting I have done to add directories for include and lib files :

以下是我为添加include和lib文件的目录所做的设置的屏幕截图:

1 http://i37.tinypic.com/153whuv.png

2 http://i37.tinypic.com/2wmi9er.png

3 http://i34.tinypic.com/2ur71g2.png

Am I missing something ?

我错过了什么吗?

4 个解决方案

#1


25  

I finally found the answer :) and I will write it here to help.

我终于找到了答案:)我会在这里写一下来帮忙。

Project>"YOURPROJECT" Properties>C/C++>General>Additional Include Directories then select where you downloaded your library . This worked and all the above didn't, so make sure not to forget it .

项目>“YOURPROJECT”属性> C / C ++>常规>其他包含目录然后选择下载库的位置。这有效,而上述所有都没有,所以一定不要忘记它。

#2


6  

I installed boost from the installer. It installs the library in c:\program files\boost.

我从安装程序安装了boost。它将库安装在c:\ program files \ boost中。

Add the directory to your project's properties like the below

将目录添加到项目的属性中,如下所示

致命错误C1083:无法打开包含文件:'boost / config.hpp':没有这样的文件或目录

#3


0  

Add the namespace after all headers:

在所有标头后添加命名空间:

using namespace std;

removing from the header (.h) did the trick.

从标题中删除(.h)就可以了。

remove all the ".h" from all headers. Should work.

从所有标题中删除所有“.h”。应该管用。

#4


0  

For me, I was building targeting the win32 platform. Changing to x64 worked.

对我来说,我正在构建针对win32平台的目标。更改为x64工作。

#1


25  

I finally found the answer :) and I will write it here to help.

我终于找到了答案:)我会在这里写一下来帮忙。

Project>"YOURPROJECT" Properties>C/C++>General>Additional Include Directories then select where you downloaded your library . This worked and all the above didn't, so make sure not to forget it .

项目>“YOURPROJECT”属性> C / C ++>常规>其他包含目录然后选择下载库的位置。这有效,而上述所有都没有,所以一定不要忘记它。

#2


6  

I installed boost from the installer. It installs the library in c:\program files\boost.

我从安装程序安装了boost。它将库安装在c:\ program files \ boost中。

Add the directory to your project's properties like the below

将目录添加到项目的属性中,如下所示

致命错误C1083:无法打开包含文件:'boost / config.hpp':没有这样的文件或目录

#3


0  

Add the namespace after all headers:

在所有标头后添加命名空间:

using namespace std;

removing from the header (.h) did the trick.

从标题中删除(.h)就可以了。

remove all the ".h" from all headers. Should work.

从所有标题中删除所有“.h”。应该管用。

#4


0  

For me, I was building targeting the win32 platform. Changing to x64 worked.

对我来说,我正在构建针对win32平台的目标。更改为x64工作。