views:

34

answers:

3

I am getting the following error when i build my code using regex.hpp I am using VS2010 VC++

fatal error C1083: Cannot open include file: 'boost/regex.hpp': No such file or directory

boost\boost_regex-vc71-mt-1_33_1.lib file is here.. is this correct?

A: 

Maybe the error message is true? The file is not there?

Pavel Radzivilovsky
boost\boost_regex-vc71-mt-1_33_1.lib file is here.. is this correct?
Saravanan I M
no. you need regex.hpp, as the error message suggests.
Pavel Radzivilovsky
A: 

You need to make sure that you have included the path to the Boost header files in Visual C++.

Follow the instructions here.

This issue arises because Visual C++ does not include the path to the Boost header files. By including the directory, Visual C++ will search that directory for the problem and hopefully your problem should be solved.

sukhbir
Also this should be helpful: http://msdn.microsoft.com/en-us/library/aa288739%28VS.71%29.aspx#boostvc_topic8
sukhbir
+1  A: 

It sounds like your include settings do not have the path to the boost installation parent directory.

Look at these instructions: http://www.boost.org/doc/libs/1_43_0/more/getting_started/windows.html#build-from-the-visual-studio-ide

and note especially the include directory setup.

John Weldon
After doing this i am getting Cannot open precompiled header file: 'Debug\test.pch': No such file or directory
Saravanan I M