Link to home
Start Free TrialLog in
Avatar of stefarg
stefarg

asked on

"C4530: C++ exception handler used, but unwind semantics are not enabled. Specify -GX." for multiple projects in a workspace

Hey All,
Can anyone tell me how to avoid this waring:

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

I followed the instuctions on http://support.microsoft.com/default.aspx?scid=kb;en-us;q154419 and I added the /GX option to all the projects in my workspace.  While this removed the warnings when I build the projects individually, the warnings appear again when I do a batch build.

Can anyone tell why this is and how to stop it?
Thanks,
Stef
Avatar of AlexFM
AlexFM

This means, there is some problems in your batch build. Can you show fragments of your build makefile?
MSDN states:

Programs that use the Standard C++ library must be compiled with C++ exception handling enabled.

To enable C++ exception handling in Visual C++:

In the Project Settings dialog box, click the C/CC++ tab, and select Enable Exception Handling in the C++ Language category.
Use the /GX compiler switch
ASKER CERTIFIED SOLUTION
Avatar of Karl Heinz Kremer
Karl Heinz Kremer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of stefarg

ASKER

Hey AlexFM,
I'm not using a makefile, I am working within VC++6.0 using .dsw and .dsp files.
I went to the project settings of all the projects in the workspace and added the /GX option in the project options.
Then I went to build on each of the projects and got no warnings.
After that I tried a batch build and the warnings were back!!
I generated makfiles for all the projects in the workspace if that's any use to you, they are available at http://delboy.ucd.ie/temp/ if you want to have a look at them.
Thanks,
Stef
Avatar of stefarg

ASKER

Dear Nonubik,
Please pay attention to the question asked before you give answers.  All you have done is posted up the content of the link I gave in the question.
Stef
My appologies to Stef
Avatar of stefarg

ASKER

khkremer,
yep, that was it!!
Thanks I didn't realise that project options differed between the release and debug versions,
Many thanks,
Stef

P.S. I have taken the mak from off my website
Avatar of stefarg

ASKER

No worries Nonubik,
Thanks for responding.