error “Incompatible build options“

2023-07-08 14:46:38 浏览数 (1)

问题1 CGAL环境,fatal error C1189: #error : "Incompatible build options" #if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)

pragma message(“Using the /RTC option without specifying a debug runtime will lead to linker errors”)

pragma message(“Hint: go to the code generation options and switch to one of the debugging runtimes”)

error “Incompatible build options”

#endif

在 Visual Studio 开发环境中设置此编译器选项

打开项目的“属性页”对话框。

单击“C/C ”文件夹。

单击“代码生成”属性页。

修改下列属性之一或两者都修改:“基本运行时检查”或“较小类型检查”

代码语言:javascript复制
1>libboost_thread-vc80-mt-1_55.lib(thread.obj) : warning LNK4217: 本地定义的符号 ??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z (public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(char const *)) 在函数 "public: virtual char const * __thiscall boost::system::system_error::what(void)const " (?what@system_error@system@boost@@UBEPBDXZ) 中导入
1>Commands.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(long)" (__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@J@Z),该符号在函数 "void __cdecl boost::assertion::detail::assertion_failed_msg<char>(char const *,char const *,char const *,char const *,long)" (??$assertion_failed_msg@D@detail@assertion@boost@@YAXPBD000J@Z) 中被引用
1>libCGAL-vc80-mt-4.4-I-900.lib(all_files.obj) : error LNK2019: 无法解析的外部符号 "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z),该符号在函数 "void * __cdecl boost::detail::allocate_raw_heap_memory(unsigned int)" (?allocate_raw_heap_memory@detail@boost@@YAPAXI@Z) 中被引用
1>libCGAL-vc80-mt-4.4-I-900.lib(all_files.obj) : error LNK2019: 无法解析的外部符号 __HUGE,该符号在函数 "void __cdecl CGAL::internal::`dynamic initializer for 'infinity''(void)" (??__Einfinity@internal@CGAL@@YAXXZ) 中被引用
1>libboost_system-vc80-mt-1_55.lib(error_code.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static unsigned int const std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::npos" (__imp_?npos@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2IB),该符号在函数 "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall boost::system::`anonymous namespace'::system_error_category::message(int)const " (?message@system_error_category@?A0xcee97830@system@boost@@UBE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) 中被引用
1>libboost_thread-vc80-mt-1_55.lib(thread.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator =(char const *)" (__imp_??Y?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z),该符号在函数 "public: virtual char const * __thiscall boost::system::system_error::what(void)const " (?what@system_error@system@boost@@UBEPBDXZ) 中被引用
1>D:developDebugmultiVersionArxDbg.Debug.v80.Win32.arx : fatal error LNK1120: 5 个无法解析的外部命令

附加依赖

代码语言:javascript复制
libCGAL-vc80-mt-4.4-I-900.lib
libCGAL_Core-vc80-mt-4.4-I-900.lib
libboost_system-vc80-mt-1_55.lib
libboost_thread-vc80-mt-1_55.lib
libboost_date_time-vc80-mt-1_55.lib
libcmtd.lib
msvcrt.lib
msvcprt.lib

忽略库

代码语言:javascript复制
msvcrt.lib
msvcprt.lib
LIBCMT.lib
代码语言:javascript复制
1>libCGAL-vc80-mt-4.4-I-900.lib(all_files.obj) : error LNK2019: 无法解析的外部符号 "void __cdecl boost::throw_exception(class std::exception const &)" (?throw_exception@boost@@YAXABVexception@std@@@Z),该符号在函数 "void * __cdecl boost::detail::allocate_raw_heap_memory(unsigned int)" (?allocate_raw_heap_memory@detail@boost@@YAPAXI@Z) 中被引用
1>libCGAL-vc80-mt-4.4-I-900.lib(all_files.obj) : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) void __cdecl boost::detail::set_tss_data(void const *,class boost::shared_ptr<struct boost::detail::tss_cleanup_function>,void *,bool)" (__imp_?set_tss_data@detail@boost@@YAXPBXV?$shared_ptr@Utss_cleanup_function@detail@boost@@@2@PAX_N@Z),该符号在函数 "public: __thiscall boost::thread_specific_ptr<int>::~thread_specific_ptr<int>(void)" (??1?$thread_specific_ptr@H@boost@@QAE@XZ) 中被引用

0 人点赞