warning C4530:C++ exception handler used, but unwind semantics are not enabled. Specify -GX

liuthinker 2004-09-09 07:44:48
warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
e:\microsoft visual studio\vc98\include\ostream(229) : while compiling class-template member function 'class std::basic_ostream<char,struct std::char_traits<char> > &__thiscall std::basic_ostream<char,struct std::char_traits<char> >::put(cha
r)'

是什么故障,怎么解决?
...全文
827 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
liuthinker 2004-09-14
  • 打赏
  • 举报
回复
多谢,已经解决了。我没有分了,见谅!!非常感谢两位仁兄!!!
liuthinker 2004-09-14
  • 打赏
  • 举报
回复
怎么改正呢???
DentistryDoctor 2004-09-10
  • 打赏
  • 举报
回复
这是因为使用了C++异常。/EHsc或/GX,两者是等价的。

exception. It is equivalent to /EHsc.

/GX is in effect, by default, when you compile from within the development environment. By default, /GX- is enabled when using command-line tools.

For more information, see C++ Exception Handling.

To set this compiler option in the Visual Studio development environment

Open the project's Property Pages dialog box. For details, see Setting Visual C++ Project Properties.
Click the C/C++ folder.
Click the Command Line property page.
Type the compiler option in the Additional Options box.
  • 打赏
  • 举报
回复
加上编译选项 /GX 或者是 /EHsc

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧