Link to home
Start Free TrialLog in
Avatar of http:// thevpn.guru
http:// thevpn.guruFlag for Denmark

asked on

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

I am trying to compile a project using VC8 Express Edition

I have downloaded boost and the file in question can be found in the dir below

C:\Program Files\boost\boost_1_34_1\boost

I have added this dir to the addtional includes of the project and i added it in the Inlude Dirs of the IDE but I am still getting this error

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

Any thing I done wrong here ?

Thx
ASKER CERTIFIED SOLUTION
Avatar of Infinity08
Infinity08
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> I have added this dir to the addtional includes of the project
I8's suggestion above is correct but also, make sure you add it to the configuration too (debug & release). It's easy to add it to the wrong one and not be able to fathom why it doesn't build! I know, I've done it! :)
>>add it to the configuration too
to the CORRECT configuration
in your cpp file write

#include "lexical_cast.hpp"

instead of

#include "boost\lexical_cast.hpp"
@alb66

Actually, that's not the way to use the boost library's... they are designed to be used in the way I8 has shown, if you try to do it the way you suggest boost's self includes will fail.