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,314 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 1

Author Comment

by:stefarg
Comment Utility
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 1

Author Comment

by:stefarg
Comment Utility
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
Comment Utility
My appologies to Stef
0
 
LVL 1

Author Comment

by:stefarg
Comment Utility
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
Comment Utility
No worries Nonubik,
Thanks for responding.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

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…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
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.

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now