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
Right click on the error list pane. Hi lenyox, You can disable the intellisence Error Reporting in VS2010 from Tools -> Option -> Text Editor -> C/C++ -> Advanced -> IntelliSence -> Disable Error Reporting.
Intellisense Errors are just wrong. It's acting like classes don't exist that are definitely there, and the project builds fine. It makes it impossible to use visual studio. The only solution is to delete the SUO file under the solution's '. vs/{project name}/v15' folder.
Intellisense is a separate compiler that works in the IDE for squiggles and code analysis.
The Visual Studio IntelliSense error checking for C++ is not perfect and often reports errors that aren't really errors (those are links to three false positives that I've found and reported; they aren't related to your problem, though).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With