[Rd] Compiler options for Makefile.win
cstrato
cstrato at aon.at
Thu Apr 2 23:17:26 CEST 2009
Dear Uwe,
My problem is that this is the only mailing list I know where to ask
this question, since this problem is definitely related to R.
When I compile my source code as stand alone library using NMAKE then
both compiler options, /MD and /MT, work fine and I can use the compiled
library from a C++ program w/o any problems.
Only compiling the source code from within R results in the error when
using /MD.
BTW, I forgot to mention that when "R CMD build" stops at:
* DONE (xps)
* creating vignettes ...
I get the following "Microsoft Visual C++ Runtime Library" dialogbox:
Runtime Error!
Program: c:\Programme\R\R-2.9.0alpha\bin\Rterm.exe
R6034
An application has made an attempt to load the C runtime library
incorrectly.
Please contact the application's support team for more information.
Best regards
Christian
Uwe Ligges wrote:
> I fear the number of R users under Windows that make use of a non-gcc
> compiler and is reading this list is quite close to 0. Hence you will
> probably have to find it out yourself.
>
> Uwe Ligges
>
>
> cstrato wrote:
>> Dear all,
>>
>> For certain reasons I have to compile the source code of my package
>> on Windows XP using Microsoft Visual Studio 9.0, thus I had to create
>> a "Makefile.win". Now I have a question regarding compiler options
>> /MT vs /MD for Makefile.win.
>>
>> The following partial output shows that when building my package on
>> Windows XP using "R CMD build --binary xps" with compiler option /MT
>> everything is ok:
>>
>> - - - - - - - -
>> running src/Makefile.win ...
>> "C:\Programme\Microsoft Visual Studio 9.0\VC\bin/cl"
>> /I"C:\root/include" /FIw32p
>> ragma.h /MT /EHsc /Ox /D "MSVC" /D "WIN32" /c TStat.cxx
>> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08
>> for 80x86
>> Copyright (C) Microsoft Corporation. All rights reserved.
>>
>> TStat.cxx
>>
>>
>> Created c:\home\Rabbitus\CRAN\xps\chm\xps.chm, 166,304 bytes
>> Compression decreased file by 442,728 bytes.
>> ** building package indices ...
>> ** MD5 sums
>> * DONE (xps)
>> * creating vignettes ... OK
>> * cleaning src
>>
>>
>> Created c:\home\Rabbitus\temp\Rbuild210430099\xps\chm\xps.chm,
>> 166,308 bytes
>> Compression decreased file by 442,724 bytes.
>> ** building package indices ...
>> ** MD5 sums
>> packaged installation of 'xps' as xps_1.3.8.zip
>> * DONE (xps)
>> - - - - - - - -
>>
>> As you see the package was built correctly.
>>
>>
>> However, when I change the compiler option in "Makefile.win" to /MD
>> the build stops at the following position:
>>
>> - - - - - - - -
>> Created c:\home\Rabbitus\CRAN\xps\chm\xps.chm, 166,306 bytes
>> Compression decreased file by 442,726 bytes.
>> ** building package indices ...
>> ** MD5 sums
>> * DONE (xps)
>> * creating vignettes ...Terminating on signal SIGINT(2)
>> - - - - - - - -
>>
>> As you see I had to terminate the build process manually after 15 min .
>>
>> My question is now:
>> Do you know why I can build my package w/o problems when using option
>> /MT but not when using option /MD?
>>
>> As a note, I am using "R-2.9.0alpha-win32.exe" which I have
>> downloaded today.
>>
>> Thank you in advance.
>>
>> Best regards
>> Christian
>> _._._._._._._._._._._._._._._._._._
>> C.h.r.i.s.t.i.a.n S.t.r.a.t.o.w.a
>> V.i.e.n.n.a A.u.s.t.r.i.a
>> e.m.a.i.l: cstrato at aon.at
>> _._._._._._._._._._._._._._._._._._
>>
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
More information about the R-devel
mailing list