|
-
December 12th, 2002, 08:10 AM
#1
How to correct "Internal Compiler Error"
Hello all,
My MFC Application compiles and runs fine on WIN2k , but doesn't get built on WinXP . "INTERNAL COMPILER ERROR" message is generated . Any help , how to deal with it and
correct it ?
Thanks , in advance.
Ashwini
-
December 12th, 2002, 09:47 AM
#2
I've found that sometimes the compiler's intermediate files get corrupted and simply doing a complete re-build will straighten things out. Failing that, try compiling each module separately; that may give you an insight into what's failing.
Regards
Robert Thompson
-
December 12th, 2002, 10:12 AM
#3
Uninstall Visual C++ and reinstall again.Or get service pack for it.
Regards,
Ramkrishna Pawar
-
December 12th, 2002, 10:47 AM
#4
It just struck me - it's interesting that nobody is suggesting "report it to Microsoft", which is what the error message tells you to do. I suppose that shows how unresponsive Microsoft is to bug reports - or am I the only one to experience that??
Regards
Robert Thompson
-
December 12th, 2002, 10:52 AM
#5
TSYS's suggestion is good, but there is one more step..
0) Make a Backup!
1) Do a Clean All on the project
2) Exit Studio
3) Delete all: OPT,NCB,PCH, SBR, BSC files in the entire tree [there are some additional files if you are doing Active-X)
4) Start Studio and do a re-build all.
I have had his situation occur many times when a project is copied (with the above mentioned files) from one computer to another (with different config, SP level, OS, etc). These files cache some system information that does not transport across machines.
If you are regularly going to do this, invest in a SourceControl package. Use VC to check in only the files that are required. On the other machine(s) check the code out from the repository. This way internal/temporary files will never be copied.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
December 13th, 2002, 04:10 AM
#6
Hello ,
Thanks to all of you for suggestions . I tried all of them , even
unisnstalling and reinstalling . But the error still persisted .
Load_Capture.cpp
Generating Code...
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'E:\8168\vc98\p2\src\P2\main.c', line 494)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
Interesting thing is that E:\ is CDROM drive and there is no CD in
it (while compilation).
Then I tried building it on another comp , just as a check ,(also running XP Professional) and whoa ! it succeeded . I still can't figure out why this sort of incompatibility arises ?
Any answers ?
Thanks once again
Ashwini
-
December 13th, 2002, 05:04 AM
#7
I never found microsoft considering and giving patches for problems.
Regards,
Ramkrishna Pawar
-
December 13th, 2002, 06:21 AM
#8
Originally posted by ashwini73
Hello ,
Thanks to all of you for suggestions . I tried all of them , even
unisnstalling and reinstalling . But the error still persisted .
Load_Capture.cpp
Generating Code...
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'E:\8168\vc98\p2\src\P2\main.c', line 494)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
Ashwini
Usually, these errors are due to a certain line in your code. The code may be valid, but there is something that VC++ doesn't parse correctly.
Here's what I would do:
Place an #if 0 - #endif around your entire CPP file. Compile it. If it compiles (and it should), then introduce a function or some code back into the file. Compile it. If it compiles, introduce more code back into the file. At some point, you should get the error.
For example:
Code:
#if 0
#include <whatever>
void foo()
{
}
void foo2()
{
}
#endif
On the next pass:
Code:
#include <whatever>
#if 0
void foo()
{
}
void foo2()
{
}
#endif
Again--
Code:
#include <whatever>
void foo()
{
}
#if 0
void foo2()
{
}
#endif
Basically you should take the "divide and conquer" approach in you CPP file to see what line or lines of code are causing this error.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|