问题描述
我想看看,如果你能定位我。
I would like to see if you could orient me.
它发生,我为了与Visual Studio 2010中使用它们当建立我的测试项目,我得到这两个智能感知错误编译,并参考了Boost库
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
检查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
跟踪 BOOST_LIB_NAME
的定义,似乎是由config.hpp定义boost_regex,其中code,我在下面,包括
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
和奇怪的是,当我指向 BOOST_LIB_NAME
它定义 BOOST_LIB_NAME
和智能感知错误消失。
and strangely when I point to BOOST_LIB_NAME
it defines BOOST_LIB_NAME
and the IntelliSense errors disappear.
我的程序生成和使用升压执行罚款:正则表达式库 - 有或没有智能感知错误;不过,我不明白为什么这些智能感知错误出现在首位,其次指着为什么在config.hpp定义宏 BOOST_LIB_NAME
。
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
.
任何指导,将大大AP preciated。
Any guidance will be greatly appreciated.
谢谢,
海梅
推荐答案
Visual Studio的智能感知错误检查C ++是不完美的,经常报道说的 (这些都是链接到三个误判,我已经找到并报告;他们不相关的问题,虽然)
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).
这篇关于加速在Visual Studio 2010中,智能感知错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!