FW: How to debug in Visual C++ 6?

Hi folks,

Its my first message in this mailing list. I’m trying to convert all my GLUT
projects to SDL since I think it is a much more rich library than GLUT (it
has sound, input, and so on…)

I followed to the bone the ‘How to’ for using SDL in M$VC++6 and in RELEASE
mode everything went fine. But in this mode I cannot debug my application
using internal MSVC++ debbuger. When I change to Debug mode, the following
error occur:

A popup message shows and says something like this: “Could not find entry
point for memchr in MSVCRTD.DLL”

I’ve put the msvcrt.lib in ignore list because it was giving me a warning
about using /NODEFAULTLIB: … but with it gives me same error plus
warning.
And before any1 says, yes I have put Multithread DLL in project settings. In
release mode everything works fine, my program runs well. In debug mode i’ve
tried Debug Multithreaded DLL and Multithreaded DLL only. None worked.

Can someone help me plis ?

Cheers,------------------
Bruce Christopher Barrera

Actually, I got this problem a long time ago. I don’t remember the
details, but I know the problem is with Debug Multithread DLL RT. Try
copying the (working) Release configuration to Debug, and then only
change where the compiler generate debug info. You only need to generate
debug symbols on your files, so, you don’t need to mess with the broken
debug runtime.

In worst case, you can also use the old (and always working) “printf
debug”. Before I solved my problem, this was my only hope.

I hope this helps,
Eduardo

PS: you really need to consider, if possible, to use an alternative free
solution. They got a better support for third-part libraries. MSVC is
very cool and a really great IDE, I have to admit, but it’s a crap when
you want to get out of the usual. Except by makefiles, C/C++ projects
nowadays are easy to port to a new compiler.

Bruce Sinner wrote:>Hi folks,

Its my first message in this mailing list. I’m trying to convert all my GLUT
projects to SDL since I think it is a much more rich library than GLUT (it
has sound, input, and so on…)

I followed to the bone the ‘How to’ for using SDL in M$VC++6 and in RELEASE
mode everything went fine. But in this mode I cannot debug my application
using internal MSVC++ debbuger. When I change to Debug mode, the following
error occur:

A popup message shows and says something like this: “Could not find entry
point for memchr in MSVCRTD.DLL”

I’ve put the msvcrt.lib in ignore list because it was giving me a warning
about using /NODEFAULTLIB: … but with it gives me same error plus
warning.
And before any1 says, yes I have put Multithread DLL in project settings. In
release mode everything works fine, my program runs well. In debug mode i’ve
tried Debug Multithreaded DLL and Multithreaded DLL only. None worked.

Can someone help me plis ?

Cheers,


Bruce Christopher Barrera


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I dont want to move to a new IDE only for the debugger. I know very well
DevCpp++ for example, but I think that the debugger of MSVC++ simply rocks
and I’m not willing to lose it…

You know what changes I need to do to my project generate those debug info?
If I use it in release mode but generating debug info maybe I can debug it ?
=)

Thxs Edu,

Btw, you are from Brazil ?

[]s
Bruce> ----- Original Message -----

From: sdl-admin@libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of
Eduardo Costa
Sent: quarta-feira, 7 de janeiro de 2004 14:39
To: sdl at libsdl.org
Subject: Re: [SDL] FW: How to debug in Visual C++ 6 ?

Actually, I got this problem a long time ago. I don’t remember the
details, but I know the problem is with Debug Multithread DLL RT. Try
copying the (working) Release configuration to Debug, and then only
change where the compiler generate debug info. You only need to generate
debug symbols on your files, so, you don’t need to mess with the broken
debug runtime.

In worst case, you can also use the old (and always working) “printf
debug”. Before I solved my problem, this was my only hope.

I hope this helps,
Eduardo

PS: you really need to consider, if possible, to use an alternative free
solution. They got a better support for third-part libraries. MSVC is
very cool and a really great IDE, I have to admit, but it’s a crap when
you want to get out of the usual. Except by makefiles, C/C++ projects
nowadays are easy to port to a new compiler.

Bruce Sinner wrote:

Hi folks,

Its my first message in this mailing list. I’m trying to convert all my
GLUT
projects to SDL since I think it is a much more rich library than GLUT (it
has sound, input, and so on…)

I followed to the bone the ‘How to’ for using SDL in M$VC++6 and in RELEASE
mode everything went fine. But in this mode I cannot debug my application
using internal MSVC++ debbuger. When I change to Debug mode, the following
error occur:

A popup message shows and says something like this: “Could not find entry
point for memchr in MSVCRTD.DLL”

I’ve put the msvcrt.lib in ignore list because it was giving me a warning
about using /NODEFAULTLIB: … but with it gives me same error plus
warning.
And before any1 says, yes I have put Multithread DLL in project settings.
In
release mode everything works fine, my program runs well. In debug mode
i’ve
tried Debug Multithreaded DLL and Multithreaded DLL only. None worked.

Can someone help me plis ?

Cheers,


Bruce Christopher Barrera


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

That’s the idea. You will use the release mode, but you will ask the
compiler to generate only the debug info the debugger needs.

I don’t remember exactly where it is, but I guess it’s on the project
settings, under C/C++ tab (maybe on the ‘Code Generation’ combo box
option). It’s something obvious, like “Debug Info”.

BTW, same as you, I’m from Brazil…

Bruce Sinner wrote:>I dont want to move to a new IDE only for the debugger. I know very well

DevCpp++ for example, but I think that the debugger of MSVC++ simply rocks
and I’m not willing to lose it…

You know what changes I need to do to my project generate those debug info?
If I use it in release mode but generating debug info maybe I can debug it ?
=)

Thxs Edu,

Btw, you are from Brazil ?

[]s
Bruce

I found it and put “Debug Info” set to “Program Database - Edit and
Continue” same as my debug configuration, but when I set a breakpoitn and
run program it says “One or more breakpoints cannot be set and were
disabled. Execution will stop at beginning of the program.”

Any ideas?

[]s
Bruce> ----- Original Message -----

From: sdl-admin@libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of
Eduardo Costa
Sent: quarta-feira, 7 de janeiro de 2004 17:03
To: sdl at libsdl.org
Subject: Re: [SDL] FW: How to debug in Visual C++ 6 ?

That’s the idea. You will use the release mode, but you will ask the
compiler to generate only the debug info the debugger needs.

I don’t remember exactly where it is, but I guess it’s on the project
settings, under C/C++ tab (maybe on the ‘Code Generation’ combo box
option). It’s something obvious, like “Debug Info”.

BTW, same as you, I’m from Brazil…

Bruce Sinner wrote:

I dont want to move to a new IDE only for the debugger. I know very well
DevCpp++ for example, but I think that the debugger of MSVC++ simply rocks
and I’m not willing to lose it…

You know what changes I need to do to my project generate those debug info?
If I use it in release mode but generating debug info maybe I can debug it
?
=)

Thxs Edu,

Btw, you are from Brazil ?

[]s
Bruce


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Debugging isn’t fully turned on yet, go to

project properties -> linker -> debugging

Set “Generate Debug Info” to Yes(/Debug)

Tyler

Bruce Sinner wrote:> I found it and put “Debug Info” set to "Program Database - Edit and

Continue" same as my debug configuration, but when I set a breakpoitn and
run program it says “One or more breakpoints cannot be set and were
disabled. Execution will stop at beginning of the program.”

Any ideas?

[]s
Bruce

-----Original Message-----
From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of
Eduardo Costa
Sent: quarta-feira, 7 de janeiro de 2004 17:03
To: sdl at libsdl.org
Subject: Re: [SDL] FW: How to debug in Visual C++ 6 ?

That’s the idea. You will use the release mode, but you will ask the
compiler to generate only the debug info the debugger needs.

I don’t remember exactly where it is, but I guess it’s on the project
settings, under C/C++ tab (maybe on the ‘Code Generation’ combo box
option). It’s something obvious, like “Debug Info”.

BTW, same as you, I’m from Brazil…

Bruce Sinner wrote:

I dont want to move to a new IDE only for the debugger. I know very well
DevCpp++ for example, but I think that the debugger of MSVC++ simply rocks
and I’m not willing to lose it…

You know what changes I need to do to my project generate those debug info?
If I use it in release mode but generating debug info maybe I can debug it

?

=)

Thxs Edu,

Btw, you are from Brazil ?

[]s
Bruce


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Problem Solved!

So, to enumerate steps to others:

  1. Put your project in ‘Release Mode’
  2. Set Code Generation under C/C++ tab to Multithreaded DLL (not Debug
    Multithreaded DLL because it is broken)
  3. Then, still under C/C++ tab, put Debug info on ‘Program Database for
    edit and continue’
  4. Finally go to Link tab and check ‘Generate debug info’ and … be
    happy! Now you can debug your code step by step without no worries!

Thanks to all who helped me, especially Eduardo Costa and Tyler…

Cheers,
Bruce “Sinner”

Tyler Nowicki wrote:> Debugging isn’t fully turned on yet, go to

project properties -> linker -> debugging

Set “Generate Debug Info” to Yes(/Debug)

Tyler

Bruce Sinner wrote:

I found it and put “Debug Info” set to “Program Database - Edit and
Continue” same as my debug configuration, but when I set a breakpoitn
and
run program it says “One or more breakpoints cannot be set and were
disabled. Execution will stop at beginning of the program.”

Any ideas?

[]s
Bruce

-----Original Message-----
From: sdl-admin at libsdl.org [mailto:sdl-admin at libsdl.org]On Behalf Of
Eduardo Costa
Sent: quarta-feira, 7 de janeiro de 2004 17:03
To: sdl at libsdl.org
Subject: Re: [SDL] FW: How to debug in Visual C++ 6 ?

That’s the idea. You will use the release mode, but you will ask the
compiler to generate only the debug info the debugger needs.

I don’t remember exactly where it is, but I guess it’s on the project
settings, under C/C++ tab (maybe on the ‘Code Generation’ combo box
option). It’s something obvious, like “Debug Info”.

BTW, same as you, I’m from Brazil…

Bruce Sinner wrote:

I dont want to move to a new IDE only for the debugger. I know very
well
DevCpp++ for example, but I think that the debugger of MSVC++ simply
rocks
and I’m not willing to lose it…

You know what changes I need to do to my project generate those
debug info?
If I use it in release mode but generating debug info maybe I can
debug it

?

=)

Thxs Edu,

Btw, you are from Brazil ?

[]s
Bruce


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl