Solved

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

Posted on 2004-04-16
8
1,347 Views
Last Modified: 2008-02-01
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
0
Comment
Question by:stefarg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 10840676
This means, there is some problems in your batch build. Can you show fragments of your build makefile?
0
 
LVL 16

Expert Comment

by:nonubik
ID: 10840682
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
0
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 250 total points
ID: 10840693
Did you add the switch to all your build configurations (e.g. Debug and Release)? Are you using a Makefile for your batch build? If so, did you export the makefile after you made the change?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:stefarg
ID: 10840723
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
0
 
LVL 1

Author Comment

by:stefarg
ID: 10840745
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
0
 
LVL 16

Expert Comment

by:nonubik
ID: 10840764
My appologies to Stef
0
 
LVL 1

Author Comment

by:stefarg
ID: 10840779
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
0
 
LVL 1

Author Comment

by:stefarg
ID: 10840816
No worries Nonubik,
Thanks for responding.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question