[Python-Dev] Should Python compile as C++?

Jack Jansen jack@oratrix.com
Tue, 5 Feb 2002 16:37:06 +0100


On Tuesday, February 5, 2002, at 01:31 , Tim Peters wrote:

>> ...
>> MSVC has had the same problem for years. What's strange is that in some
>> cases, MSVC does seem to get it right where in others it fails with an
>> error -- probably a DLL vs. EXE thing.
>
> MS C can't handle cross-DLL references in initializers, because they're
> truly not "constant" in the way C requires (but C doesn't say anything 
> about
> DLLs!).

I've always understood that the problem here was that Microsoft's object 
file format allows for patching up references in the text segment but 
not in the data segment. And C++ doesn't have the problem, because it 
can do initializers in code anyway, so it doesn't need a data segment 
reference to the symbol from the DLL.
> --
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -