[英]Boost in Visual Studio 2010, IntelliSense error
我想看看你能不能定向我。
碰巧我編譯並引用了boost庫,以便在Visual Studio 2010中使用它們。在構建測試項目時,出現了這兩個IntelliSense錯誤
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頭文件,第一個錯誤在此行
#ifndef BOOST_LIB_NAME
# error "Macro BOOST_LIB_NAME not set (internal error)"
#endif
跟蹤BOOST_LIB_NAME
的定義,似乎是boost_regex在config.hpp中定義的,我在下面包含了這些代碼
#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
,並且IntelliSense錯誤消失了。
我的程序使用Boost:Regex庫構建並執行良好-有或沒有Intellisense錯誤; 但是,我不明白為什么這些IntelliSense錯誤首先出現,其次為什么指向config.hpp中的宏定義BOOST_LIB_NAME
。
任何指導將不勝感激。
謝謝,
海梅
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.