Solved

Missing "exception." header file

Posted on 1998-12-02
6
183 Views
Last Modified: 2010-04-02
I'm trying to compile samples from a book called "Systems programming for Windows 95" by Walter Oney.
I finally got my hands on VC++ 4.2 although the author originaly used 4.0

When I'm compiling one of the plain exe files, I get an error message which can't find a file called "exception" in my include directories. The file is refered to in another include file called "new" which is called from "new.h".

I don't have the "exceptions" files anywhere.

Please help.
0
Comment
Question by:ssite
  • 3
  • 3
6 Comments
 
LVL 22

Expert Comment

by:nietod
Comment Utility
the exception include file is part of the standard library.  It would have been added to the library somewhat more recently.  Is the new and new.h files you are using the ones that were shipped with VC 4.2?  You don't want to be using a version of the standard library that was not shipped with the compiler.  (Unless you know it can support it, which would be unussual.)

You might try reinstalling VC 4.2 to see if it installs the file.
0
 
LVL 1

Author Comment

by:ssite
Comment Utility
Thanks for the info. I've installed 4.2 TODAY in a folder which didn't exist before. I think I even did it after installing MASM.

Could you do me a HUGE favour ?? Could you zip your "include" folder (of VC4.2) and send it to me at ssite@netvision.net.il

It should zip up to a small size.

Thanks,
ssite.
0
 
LVL 22

Expert Comment

by:nietod
Comment Utility
Sorry, I have VC 5 and 6, but not 4.   the include for 5 probably would not work on 4.2  (I'm willing to try if you want, but I really think it would be a waste of time.)

Are you compiling from the command line?  If so did you run the vcvars32.bat file?

In my new (or new.h) include the line that included <exceptions> was in some #if code.  Is it in yours?  Can you prevent inclusion of <exception> by fooling with the variables the if depends on?

Did you confirm that the new and new.h files it is finding are the ones that came from VC 4.2?  If you have other versions of C++ installed it might be finding files from them.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 1

Author Comment

by:ssite
Comment Utility
Thanks, nietod. I solved it. It was a bad installation CD of 4.2 which failed on that specific file.

What a drag for wasting time. It compiles o.k. now.

Answer the question for your points.

Thanks,
ssite.

0
 
LVL 22

Accepted Solution

by:
nietod earned 50 total points
Comment Utility
Thanks.
0
 
LVL 1

Author Comment

by:ssite
Comment Utility
Here they are :-)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

762 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