描述:
警告如下:
d:\program files\microsoft visual studio\vc98\include\istream(547) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
d:\program files\microsoft visual studio\vc98\include\ostream(234) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
d:\program files\microsoft visual studio\vc98\include\ostream(229) : while compiling class-template member function
d:\program files\microsoft visual studio\vc98\include\istream(46) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
d:\program files\microsoft visual studio\vc98\include\istream(41) : while compiling class-template member function 'bool __thiscall std::basic_istream<char,struct std::char_traits<char> >::ipfx(bool)'
d:\program files\microsoft visual studio\vc98\include\xstring(525) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
d:\program files\microsoft visual studio\vc98\include\xstring(521) : while compiling class-template member function 'void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Copy(unsigned int)'
这样的问题怎么解决呀?大虾帮忙!
解决方案1:
Project设置不对引起的
如下解决:
Alt+F7后,C/C++属性页, Category选C++ Language后。选择Enable exception handling。
重新编译。