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

cstrato cstrato at aon.at
Fri Oct 16 18:57:19 CEST 2009

Dear Simon,

Of course I have read the MS docs, especially:
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:
If you have any idea in this case I would appreciate it very much.

Best regards

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

More information about the R-devel mailing list