Problem compiling root_v5.24.00 with VC9.0 on Windows Vista

Hi Valeri,

You need not give me an example of fixing “R”. Simply give me an example of fixing “root.exe”,
i.e. prevent root from loading MSVCR90.DLL and force “root.exe” to load MSVCRT.DLL instead of MSVCR90.DLL.

Best regards
Christian

[quote=“cstrato”]Hi Valeri,

You need not give me an example of fixing “R”. Simply give me an example of fixing “root.exe”,
i.e. prevent root from loading MSVCR90.DLL and force “root.exe” to load MSVCRT.DLL instead of MSVCR90.DLL.

Best regards
Christian[/quote]Ok.
Can you create with MinGW the exe file

#include <stdio.h> int main() { printf("Hello Worl!d\n"); return 0; }and send me the makefile and the log of Dependency Walker session (send it to fine@bnl.gov ) ?
Thank you

Hi,

Sorry to interfere in the discussion, but I think this is going nowhere…
Valeri, thanks a lot for trying to help and for spending your time on this, but I don’t see how making this exercise with MinGW would help (or did I miss something?)
As I already told Christian, I’m going to try to help, but not right now, since we have a very important release coming and don’t have time to spend on this very specific issue for the time being.
Just trying to save your time… :wink:

Cheers, Bertrand.

Dear Bertrand, dear Valeri,

Please allow me to make some personal comments first:
I am always amazed by the great help that I receive from you both and the other ROOT developers although my project has definitely
nothing to do with HEP, and I appreciate very much the time you “waste” in trying to help me.

In the current case I realize that you both have different opinions how you can help me, and I am definitely not in the position to
understand which approach may be the correct one, since you are the Windows experts. However, what I have learned from quantum
phyiscs is that it is often helpful to replace “either-or” with “and”, i.e. follow both approaches. Thus personally I am willing to follow
the suggestions of both of you if you are still willing to “waste” your time for me (at least I will learn a lot).

For this reason I will try to do the exercise with MinGW, even if it may not help, but since “R” has been compiled with MinGW while
my library (to be called from within “R”) as well as ROOT are compiled with VC++, this may be a chance (for me) to understand the
behavior on WinXP vs Vista.

Thank you both once again.
Best regards
Christian

[quote=“cstrato”]… this may be a chance (for me) to understand the behavior on WinXP vs Vista.
[/quote]My advice was - use google. Use Google for “Vista MSVCRT.DLL” to find tones of the explanations
kobyk.wordpress.com/2007/07/20/d … al-c-2005/
neilhendo.wordpress.com/2008/09/ … -versions/
bytes.com/topic/net/answers/6110 … -dll-error
llbit.se/?p=19
like this:[quote]… they (Microsoft) thought that non-Windows developers (third parties as well as
MS non-Windows developers) are :exclamation: never :exclamation: supposed to use system32’s msvcrt.dll.
That’s only for Windows components. We believe you should be using
msvcr80.dll followed with VS2005.

To find out why your application is connecting to system32’s msvcrt.dll,
you could use depends.exe to check just which binary is trying to access
msvcrt.dll. Or enable loader snaps and look at the output in the debugger.[/quote]

I’ve downloaded your files as well as R and none contains MSVCRT.DLL file.
Then Vista may not provide any MSVCRT.DLL as the mandatory system component.
XP does provide it. This is the main difference between these systems.
If MSVCRT.DLL is not a part of your Vista system and it is not the part of your distribution then WHERE it comes from?
See for example
social.answers.microsoft.com/For … 43c08341a5

[quote]msvcrt.dll is part of the Microsoft Visual C++ runtime, which is something used by many Windows applications.

Some of the software update can replace the version used by Windows with another version[/quote]
(of course Axel and Bertrand knew all of these. This explanation for Christian only)
That’s theory. My conclusion, one has to fix "R"to get rid of the toxic “msvcrt.dll”(or include the concrete version into the destribution) . How to do that? It may be very simple (and it may be impossible without the recompilation of the entire ROOT under MinGW) but I was reluctant to spend time to download, learn and investigate the system (R + MinGW) that I have no chance to use in the foreseen future. I hoped the information I was providing was sufficient to allow you to resolve the issue yourselves.

I have no Vista right now, its hard drive died :cry: and I am waiting it back from the repair shop.
For the HelloWorld.cxx

int main() { return 0; }compiled with MinGW the “Dependency walker” provides:[quote]gcc HelloWord.cxx[code]d:\downloads\rootforum\expert\A.EXE ( 15 KBytes)

  • c:\windows\system32\MSVCRT.DLL (version version 7.0.2600.5512) [/code][/quote]

[quote]gcc HelloWord.cxx -lmsvcr70 [code] d:\downloads\rootforum\expert\A.EXE ( 15 KBytes)

  • c:\windows\system32\MSVCR70.DLL (version 7.00.9466.0) [/code][/quote][quote]gcc HelloWord.cxx -lmsvcr80 [code] d:\downloads\rootforum\expert\A.EXE ( 15 KBytes)
  • c:\windows\system32\MSVCR80.DLL (version 8.00.50727.762) [/code][/quote]

[quote]gcc HelloWord.cxx -lmsvcr90 [code] d:\downloads\rootforum\expert\A.EXE ( 15 KBytes)

  • MSVCR90.DLL - Error opening file. The system can not find the file specified[/code][/quote]
    With VC++ [quote]cl HelloWord.cxx /MD [code] d:\downloads\rootforum\expert\HELLOWORD.EXE ( 5 KBytes)
    • c:\windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_b80fa8ca\MSVCR80.DLL
      ( version 8.00.50727.3053 ) [/code][/quote]As one can see Bertrand is correct [quote=“Bertrand”]. . . this is going nowhere…
      . . . I don’t see how making this exercise with MinGW would help …[/quote]unless I have missed something.

By this reason I think we should stop and do not pollute this list further. Send me the private message as soon as you need my assistance.

Dear Valeri,

Thank you for this interesting information, I need some time to understand the details.
I will send you the private message.

Best regards
Christian