Building win32gdk root from sources: debug runtime

I build win32gdk root in debug from sources using cygwin on my Win2k box:

.\configure win32gdk
export ROOTBUILD='debug’

and sure enough, I get root libraries with debug info. However, when I look at the dll’s with the dependancy walker, I see that they use NON debug version of the runtime, e.g. MSVCRT.DLL. I believe this is the source of my trouble with heap problems I have been encountering lately in the debugger: If I build my application using MSVCRTD.DLL, I get crashes (see, for example) If I build my application with MSVCRT.DLL, my asserts don’t behave properly (abnormal program termination instead of a nice dialog box)

How do I instruct make to use the MSVCRTD.DLL? Or in other words, how do I instruct the compiler to use the /MDd switch when in debug mode?

Note: I am running VC6 w/ SP5 and an old version of cygwin that I am currently updating. I’ve been building from v3.10/0 sources generated on 9/20/03


Ed Oltman

Hi Ed,
msvcrt.lib is a part of $(syslibs) which are
defined in build/win/
You can edit this file.

Currently I’m preparing VC6/7 project files for $ROOTSYS/test
programs. One of the my “dreams” is prepare project files
for the whole ROOT in order to be “not-connected with cygwin”.

Is there any volunteer to help?

Regards. Valeriy

Hi Valeriy,
What about the msvcrt’s in build/make/ - does this need to change?

Also, it seems that the -MD switchs in configure/Makefile.win32gdk need to change to -MDd in order to make the debug libraries, right? Why are there four separate compiler switch flags? Would I need to change them all?

I share your dream of project files. Point me in the direction to learn how the current build system works and perhaps I can help. I am a vc++6 user - have not graduated to (yet)

Here’s something: says [quote]Note valid for all Windows versions:
This version has been compiled with the ANSISTREAM compatibility option. To use this version, you may have to:
Add the option -GX in your compiler options.
In your includes replace iostream.h by Riostream.h
Replace reference to MSVCIRT.LIB by MSVCPRT.LIB when linking.
However, when I build root from sources using cygwin and then look at libCore.dll with the dependancy walker, it shows MSVCIRT.DLL. Could that be part of my problem?

Two of the compiler flags in config\Makefile.win32gdk do not have the -GX option: CFLAGS and CINTCFLAGS - should they? (I’m grasping at straws here since I don’t really understand how these flags are even used in the build…)



Oops - the module that used msvcirt was libCint.dll not libCore


If you modify build/win/, you should modify accordingly (so that ACLiC works properly).