From cstrato at aon.at  Fri Oct 16 18:57:19 2009
From: cstrato at aon.at (cstrato)
Date: Fri, 16 Oct 2009 18:57:19 +0200
Subject: [Rd] Question when compiling source code with VC++
In-Reply-To: <DB7B0AE0-0566-46DD-B5A4-D0D104C25E79@r-project.org>
References: <4AD78D98.80709@aon.at>
	<DB7B0AE0-0566-46DD-B5A4-D0D104C25E79@r-project.org>
Message-ID: <4AD8A5EF.9040802@aon.at>

Dear Simon,

Of course I have read the MS docs, especially:
http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx
which says, that /MT uses the multithread, static version of the 
run-time library.
As far as I understand this is not what most people want since to my 
knowledge most programs seem to use the /MD option.

I also know that option /MT works pretty well for source code of 
R-packages compiled for Windows XP. My second question is if it will 
also work with Windows 7 which I do not have yet.

Furthermore, you may have realized that since some time I am trying to 
find out why in my case neither option works on Vista, see my more 
detailed question at:
https://stat.ethz.ch/pipermail/r-devel/2009-September/054843.html
If you have any idea in this case I would appreciate it very much.

Best regards
Christian


Simon Urbanek wrote:
>
> On Oct 15, 2009, at 17:01 , cstrato wrote:
>
>> Dear Duncan,
>>
>> In your document "readme.packages.txt" you have a very helpful 
>> chapter on "Using Visual C++".
>> Please allow me to ask you one question: Why do you propose the 
>> option "/MT" instead of option "/MD"?
>> (To my knowledge usually option "/MD" is used when compiling programs 
>> with VC++.)
>>
>
> Have you read the MS docs? They have different purposes - /MD pulls in 
> MSVCR which may not be what you want (depending on your code), /MT 
> just says that you want thread-safe libs. The fact that something is 
> "usually" used is not necessarily a very good indicator -- it's better 
> if you know what you're doing ;).
>
> Cheers,
> Simon
>
>



[Rd] Question when compiling source code with VC++
cstrato