Boost in Visual Studio 2010, IntelliSense error

Posted by Peretz on Stack Overflow See other posts from Stack Overflow or by Peretz
Published on 2010-06-07T17:44:30Z Indexed on 2010/06/07 17:52 UTC
Read the original article Hit count: 579

Filed under:
|
|

Hello,

I would like to see if you could orient me.

It happens that I compiled and referenced the boost libraries in order to use them with Visual Studio 2010. When building my test project I get these two IntelliSense errors

1   IntelliSense: #error directive: "Macro BOOST_LIB_NAME not set (internal error)" c:\boost_1_43_0\boost\config\auto_link.hpp

2   IntelliSense: #error directive: "some required macros where not defined (internal logic error)."    c:\boost_1_43_0\boost\config\auto_link.hpp

Checking the auto_link.hpp header file the first error is in this line

#ifndef BOOST_LIB_NAME

# error "Macro BOOST_LIB_NAME not set (internal error)"

#endif

Tracing the definition of BOOST_LIB_NAME, it seems that is defined in config.hpp by boost_regex, which code I am including below

#if !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE) && !defined(BOOST_ALL_NO_LIB) && defined(__cplusplus)

# define BOOST_LIB_NAME boost_regex

# if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)

# define BOOST_DYN_LINK

... more code

and strangely when I point to BOOST_LIB_NAME it defines BOOST_LIB_NAME and the IntelliSense errors disappear.

My program builds and executes fine using the Boost:Regex library -- with or without the Intellisense errors; however, I do not understand why these IntelliSense errors appear in the first place, and second why pointing the macro in the config.hpp defines BOOST_LIB_NAME.

Any guidance will be greatly appreciated.

Thanks,

Jaime

© Stack Overflow or respective owner

Related posts about c++

Related posts about visual-studio