PDA

View Full Version : Visual C++ Compiler trouble


MentalOne
07-22-2005, 04:25 PM
Hey,

I've been having loads of trouble with the Visual C++ compiler.
Whenever I make an error, it tells me that I made one, but it doesn't give any further information. (Which line the error is on, what kind of error it is, etc)

When I installed it it prompted me about this, telling me to click an icon about the debugger, I am however unable to find this icon. I'm not even sure it's there.

Can someone please help me with this most frustrating problem?

-MentalOne

aman
07-22-2005, 09:04 PM
Yea that's odd, the error information and line number should show up in the bottom build window.

The debugger is is only useful if you have successfully compiled the program and want to run it to catch runtime errors. It's located at Build->Start Debug->Go or you can use the icon by right-clicking in the toolbar and selecting Debug to activate the debug toolbar.

Search the MSDN for answers to the compiler problem, and if you can't get it working, you could try reinstalling the program. If you get the same error message while reinstalling write it down exactly as it appears and google for those terms.

MentalOne
07-23-2005, 01:36 PM
Yeah, I've done all of those. (Aside from the MSDN thing)
I'll reinstall again (done it several times before) and google and give you the exact message.

EDIT: Alright, this is the exact message: Setup has installed an icon in the Microsoft Visual C++ 6.0 tool program group, that will allow you to install a subset of the Windows NT system symbols (.DBG) files from your Visual C++ CD Rom. If the symbols are not installed, the Visual C++ debugger is not always able to determine the context of called functions.

For easy application debugging, it is strongly recommended that you install these files.

See the Visual C++ readme for more information.

aman
07-24-2005, 01:01 AM
Oh well that sounds pretty self-explanitory doesn't it? Have you looked in your Tools menu for what it's talking about? Have you read the manual for what it refers to?

It sounds like it might be talking about the source code of all the standard library files, which you don't neccessarily need. For example, if there's a runtime error in strcpy() or other library functions, it makes no sence to get to the source of that problem because the problem isn't their code but yours. Use the Context dropdown in the Variables window to step back thru the code untill it brings you to the last line in your code which called the function that caused the problem.

Try this, make a console project and add the code, make sure you compile the debug version..

int main()
{
char *p;
strcpy(p, "hello crash!");

return 0;
}

Then choose Build->Start Debug->Go and it should brin up some error about not being able to find STRCAT.ASM which is fine. Cancel that popup and select strcat() from the context dropdown, change it to main() and it should take you to the strcpy(p, "hello crash!"); line in your code.

If that doesn't work then well I guess you might have to read the manual like it says afterall :/