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,337 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
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
ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

777 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