Login  Register

Re: Specifying library to link

Posted by Luigi Ballabio-2 on Jun 07, 2004; 10:03am
URL: http://quantlib.414.s1.nabble.com/Specifying-library-to-link-tp10593p10595.html

On 2004.06.07 17:20, Ferdinando Ametrano wrote:

> At 02:29 PM 6/7/2004, Andre Louw wrote:
>> I'm trying to get the SWIG/Python setup on Windows to link to a  
>> library other than the one created by the 'Release' configuration,  
>> where does 'distutils'/setup.py get the information it uses to  
>> decide which library to link against?
>
> I'm not that much familiar with SWIG/Python anymore, anyway the  
> library to be linked should be automagically selected by including  
> config.msvc.hpp through the inclusion of qldefines.hpp
> This should apply everywhere under Windows.

In fact the point is not how to tell which QuantLib library to use, but  
how to compile the wrappers. Including among the compiler options ones  
such as /MD, /ML or /MT should help--you'll have to modify the relevant  
variables in setup.py. Type cl -help at a command prompt to see which  
one corresponds to the one you want.

>> While I'm on the subject, how does it decide which compiler to use  
>> (I have both VC6 and 7 installed and it still uses 6 to compile  
>> with).
> The above SWIG/Python disclaimer still applies, anyway it should  
> depend on which compiler Python has been compiled with. As long as  
> you use the official Python distribution compiled with VC6 you're  
> going to only link VC6 libraries.

Alternatively, you might try putting your VC7 installation before VC6  
in your PATH.

Later,
        Luigi