Dear ROOTers
As a test to convert my program for WinXP I have created a test program “myclassR1” (see attachement).
For this I have created “Makefile.win32” (see attached file) which I have adapted from root/test.
Using this Makefile.win32, I can compile myclassR1 as DLL using MS VC++ 2008.
The problem is that I need to create the DLL as part of my package for “R”, which by default compiles
C/C++ code using MinGW. However, VC++ can also be used to “compile the objects and
build the DLL” in the following way:
cl /MT /Ox /D "WIN32" /c *.c
link /dll /def:mypkg.def /out:mypkg.dll *.obj Rdll.lib
where I need to create the .def file by hand (which I did).
When testing to create an R package with a program containing C++ classes w/o ROOT I could indeed
create the necessary Makfile.win. However, trying to create the “Makefile.win” for “myclassR1”
(see the attached Makefile.win), I get the following output:
Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.
cl /Ic:\root/include /MT /EHsc /Ox /D "MSVC" /D "WIN32" /c MyClassC.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
MyClassC.cxx
Generating dictionary MyClassCDict.cxx...
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
MyClassCDict.cxx
cl /Ic:\root/include /MT /EHsc /Ox /D "MSVC" /D "WIN32" /c MyClassA.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
MyClassA.cxx
cl /Ic:\root/include /MT /EHsc /Ox /D "MSVC" /D "WIN32" /c MyClassB.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
MyClassB.cxx
cl /Ic:\root/include /MT /EHsc /Ox /D "MSVC" /D "WIN32" /c rwrapper.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
rwrapper.cxx
cl /c MyClassCDict.cxx
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
MyClassCDict.cxx
MyClassCDict.cxx(7) : fatal error C1083: Cannot open include file: 'RConfig.h': No such fi
le or directory
NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : re
turn code '0x2'
Stop.
The problem seems to be when trying to linke the code?
Can someone please tell me what is missing in my Makefile.win?
I would greatly appreciate any help from the Windows experts.
Thank you in advance.
Best regards
Christian
Makefile.win32.txt (3.71 KB)
Makefile.win.txt (3 KB)
myclassR1.tar.gz (8.83 KB)