DLL in Python

Mike Müller mmueller at dgfz.de
Wed Oct 25 10:51:35 EDT 2000


Alex Martelli wrote:
>Ooops, you also need a line of
>
>#include <windows.h>
>
Actually I looked for the missing *.h but could not find the right file in
long list under \include.

Now my dll works. I had to add extern "C" because I used the .cpp extention
(trying to switch to .c it seems to have problems compiling the content of
Python.h and gave a bunch of errors).

I tested the dll with the help of  windll and also wrote a short C++
programm that called the dll. Everything is ok.

Now I just have resolve the FORTRAN-C problem of exchanging int. Defining
integer(4) or integer(2) in FORTRAN does not seem be the same as in C, at
least the addition of 22 and 33 does not return 55 (as it does with windll
and the C++ program) but -28,996 for interger(2) or  8,949,436 for
integer(4). Have to ask the guy who is charge with the FORTRAN program to
solve this one when he is back.

Thanks for your help.

BTW, what would be the best reference for VC++. There are lot out there but
which one would you recommend?

Thanks a lot.

Mike





More information about the Python-list mailing list