Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/08/2011 at 04:25, xxxxxxxx wrote:
Hi,
I want to write a module for c4d using Cython, but importing the compiled module fails with "DLL %1 is not a valid win32 executable" when using with Cinema 4d 64 Bit.
I created a libpython26.a using dlltool and my gcc-command looks like this:
gcc __init__.pyx -shared -o test_a.pyd -I"C:\Program Files\MAXON\Cinema 4D\resource\modules\python\res\Python.Win64.framework\include" -L"C:\Program Files\MAXON\Cinema 4D\resource\modules\python\res\Python.Win64.framework\libs" -lpython26
Am i missing something ?
Thanks,
On 13/08/2011 at 10:49, xxxxxxxx wrote:
Hey Nux,
I am not really sure, but I guess it is like this:
If you compile for Cython, you can only run it with Cython. If you compile a dll, you will be able to use it within python.
http://sig9.com/node/35 http://www.perrygeo.net/wordpress/?p=116
http://stackoverflow.com/questions/252417/how-can-i-use-a-dll-from-python http://docs.python.org/library/ctypes.html
Cheers, maxx
On 14/08/2011 at 09:51, xxxxxxxx wrote:
Here is another enlightenment I had:
>>Is a *.pyd file the same as a DLL?
>>Yes, .pyd files are dll's, but there are a few differences. If you have a DLL named foo.pyd, then it must >>have a function initfoo(). You can then write Python "import foo", and Python will search for foo.pyd >>(as well as foo.py, foo.pyc) and if it finds it, will attempt to call initfoo() to initialize it. You do not link >>your .exe with foo.lib, as that would cause Windows to require the DLL to be present.