views:

52

answers:

1
+1  Q: 

Debugging issues

Hi, I have a certain application in MSVC6.0 all C code. I have it as two workspaces :

1.) First workspace creates a static library file, *.lib after compiling the source.

2.)Second workspace has a test application(main()) and links the previously generated *.lib library and creates and exe.

When i try to single step the test application, i am not able to do so. It keeps asking for a file crt0.c and even after pointing it to that file, i am not able to step in my main function at all, it exits without even entering my main.

[The same setup works if i just exectute Ctrl-F5. It works fine with correct output, so no issues in execution]

But i need to debug/single-step.

So i did one thing to verify.

Created one new workspace in MSVC6.0 (Win32 console application without generating this library et al. A single workspace generating an exe. In this new setup, i am able to debug through the main().

1.) Any pointers what is happening? Why am i not able to debug in my library-executable setup?

2.) How can i do the debugging in that setup? Any project settings i am missing on?

-AD

A: 

Under Project Settings / C++ / General, ensure you have debug information enabled, e.g. set to Program Database. Under Project Settings / Link / Debug, make sure Debug info is ticked and Microsoft format is selected.

Shane MacLaughlin