[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-dev] requiring a real boost install

On 2/26/10 9:24 AM, Daniel Russel wrote:
Windows DLL joy. What are the runtime differences? I thought there was
just the debug/release split. Or are there more? We don't have the same
issue with everything else that is loaded into python? Or is python
careful enough not to care?

Oh yes, you have the same issue with Python as soon as you start trying to pass around more complex structures that are handled by the C runtime (FILE* is the most common):

(That's a really old link, for Python 1.5, but applies to recent versions too.)

Generally we don't notice this of course since we don't pass FILE* around much. But in IMP this means the C++/Python streams support can't use the (faster) underlying file descriptor on Windows when the Python stream is a simple wrapper around a FILE* (it has to go through the higher level Python API instead). You can see an #ifdef for that in kernel/pyext/IMP_streams.i.

In order for things to work "properly" on Windows you have to compile everything with the same version of MSVC, with the same debug/release flags, and the same single-threaded/multi-threaded options. Or you have to carefully audit and test your code to make sure it doesn't ever use the troublesome parts of the API. It's a big mess.

"It is a capital mistake to theorize before one has data."
	- Sir Arthur Conan Doyle