Hi, 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? 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). Any help appreciated Andre |
Hi
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. >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. ciao -- Nando |
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 |
Still on this, I asked: > how does it (distutils) decide which compiler to use Luigi wrote: > you might try putting your VC7 installation before VC6 in your PATH. It's not a question of which compiler it _finds_, distutils puts in a fully qualified name for the compiler i.e "C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe etc...", I've checked and I can't find any environment variable (except my PATH) that it might use? Any other suggestion? Andre |
On 2004.06.08 10:07, Andre Louw wrote:
> distutils puts in a fully qualified name for the compiler i.e "C: > \Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe etc...", I've > checked and I can't find any environment variable (except my PATH) > that it might use? Any other suggestion? No, unfortunately I've run out of ideas. The only suggestions I can give are to try: - the distutils sources - the Python mailing list (or newsgroup, they're aliased) Later, Luigi |
Free forum by Nabble | Edit this page |