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,356 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
  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 viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

617 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