Log in

View Full Version : How can I debug MS VC++ applications?


Vortex
March 15th, 2003, 03:27
How can I debug my VC++ apps? Which commanline params or
switches I need to add to cl.exe and link.exe?

Regards,

Vortex

Anonymous
March 15th, 2003, 03:50
try
cl /Gi /c ....
link /debug

make sure .pdb thing is in same directory as the app

servil

Anonymous
March 15th, 2003, 03:52
sorry should be

cl /Zi /c ...

svl

Anonymous
March 19th, 2003, 03:02
Thanks for the help Servil,but the swicthes
didn't work for me.

Anonymous
March 20th, 2003, 10:39
Run cl.exe and link.exe without the params and you will have complete list of params and what they do (at leats i hope )

Anonymous
March 20th, 2003, 15:59
I thought it was "cl /?" for list of params?

Anonymous
March 21st, 2003, 14:43
I run this cl.exe and i can only say that you will have to run help. cl.exe have this options, but i didn't try it or test it (you can do this):

- OUTPUT FILES -
/Fd[file] name .PDB file
/Fm[file] name map file
...
- LANGUAGE -
/Zi enable debugging information
...
- MISCELLANEOUS -
/Yd put debug info in every .OBJ
...
- LINKING -
/MD link with MSVCRT.LIB /MDd link with MSVCRTD.LIB debug lib
/ML link with LIBC.LIB /MLd link with LIBCD.LIB debug lib
/MT link with LIBCMT.LIB /MTd link with LIBCMTD.LIB debug lib
/LD Create .DLL /F<num> set stack size
/LDd Create .DLL debug libary /link [linker options and libraries]

For link.exe is next 2 switches:

/DEBUG
/DEBUGTYPE:COFF
/SUBSYSTEM:WINDOWS

This 3 for link i use in masm.