warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX
什么意思?

解决方案 »

  1.   

    在编译选项中添加 /GX
    C++ exception handling was used but the Enable Exception Handling (/GX) option was not selected. When the /GX option has not been enabled, an object with automatic storage in the frame between the function doing the throw and the function catching the throw will not be destroyed. However, an object with automatic storage created in a try or catch block will be destroyed.
      

  2.   

    -GX我加在link里,说unrecognized option "GX"; ignored???
      

  3.   

    在 project -> setting ->加入 /GX不然 release b版本中的 try{} catch{}
    不起作用