• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1119
  • Last Modified:

Visual C - error

When tring to compile a C file in a console app. in Visual C++ 5.0 I got the following error:
excpt.h(31): fatal error C1189: #error : ERROR: Use of C runtime library internal header file.
What is it and can I fix it?
0
s_lavie
Asked:
s_lavie
  • 2
  • 2
1 Solution
 
NakedTimeManCommented:
Hi s_lavie,

the problem is that you are using "#error" on your define section, and telling it to use an undefined define....  let me see if I can clear that up for you...

As you can see on the next example _MYDEF is UNdefined and then is referenced by the #error clause and the linker cant find it.

either #define the _MYDEF or take the #error out

#undef _MYDEF

#if !defined(_MYDEF)
#error _MYDEF // must be defined !!
#endif

int main() {
    return 0;
}

Take care
NakedTimeMan
0
 
s_lavieAuthor Commented:
Hi NakedTimeMan,
I'm not sure i was clear, but the header file excpt.h is not my file, but the "Visual"'s file. No way I made undef to something, it must be a problam of my enviornment definitions, I guess, isn't it?

0
 
NakedTimeManCommented:
Hey s_lavie

Well, there are 2 things that you might want to try, first try to add #include <fpieee.h> before the line where excpt.h is included.

if this doesnt work... is it necessary that you include excpt.h? can you try comenting out that line and recompiling?

I looked at the file excpt.h and unless you are trying to write your own exception hanlding routines doesnt look like you are going to need anything in that file...

Take care,
NakedTimeMan

0
 
s_lavieAuthor Commented:
Hi NakedTimeMan,
I probably had a problem in the instalation - I reinstaled the compiler, and it goes fine. I don't no what caused that problem, but I'm OK for now.
Thanks      
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now