Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ python setup.py build
- running build
- running build_ext
- building 'MyLib' extension
- c:MinGW64binx86_64-w64-mingw32-gcc.exe -mdll -O -Wall -Ic:Python27libsite-packagesnumpycoreinclude -Ic:Python27include -Ic:Python27PC -c MyLib.c -o buildtemp.win-amd64-2.7Releasemylib.o
- MyLib.c: In function 'initMyLib':
- MyLib.c:631:5: warning: implicit declaration of function 'Py_InitModule4_64' [-Wimplicit-function-declaration]
- writing buildtemp.win-amd64-2.7ReleaseMyLib.def
- c:MinGW64binx86_64-w64-mingw32-gcc.exe -shared -s buildtemp.win-amd64-2.7Releasemylib.o buildtemp.win-amd64-2.7ReleaseMyLib.def -Lc:Python27libs -Lc:Python27PCbuildamd64 -lpython27 -o buildlib.win-amd64-2.7MyLib.pyd
- buildtemp.win-amd64-2.7Releasemylib.o:MyLib.c:(.text+0x13d): undefined reference to `__imp_PyExc_ValueError'
- buildtemp.win-amd64-2.7Releasemylib.o:MyLib.c:(.text+0x1275): undefined reference to `__imp_PyExc_ValueError'
- buildtemp.win-amd64-2.7Releasemylib.o:MyLib.c:(.text+0x1eef): undefined reference to `__imp_PyExc_ImportError'
- buildtemp.win-amd64-2.7Releasemylib.o:MyLib.c:(.text+0x1f38): undefined reference to `__imp_PyExc_AttributeError'
- buildtemp.win-amd64-2.7Releasemylib.o:MyLib.c:(.text+0x1f4d): undefined reference to `__imp_PyCObject_Type'
- buildtemp.win-amd64-2.7Releasemylib.o:MyLib.c:(.text+0x1f61): undefined reference to `__imp_PyExc_RuntimeError'
- buildtemp.win-amd64-2.7Releasemylib.o:MyLib.c:(.text+0x1fc7): undefined reference to `__imp_PyExc_RuntimeError'
- buildtemp.win-amd64-2.7Releasemylib.o:MyLib.c:(.text+0x1ffe): undefined reference to `__imp_PyExc_RuntimeError'
- buildtemp.win-amd64-2.7Releasemylib.o:MyLib.c:(.text+0x2042): undefined reference to `__imp_PyExc_RuntimeError'
- buildtemp.win-amd64-2.7Releasemylib.o:MyLib.c:(.text+0x206c): undefined reference to `__imp_PyExc_RuntimeError'
- buildtemp.win-amd64-2.7Releasemylib.o:MyLib.c:(.text+0x208a): more undefined references to `__imp_PyExc_RuntimeError' follow
- buildtemp.win-amd64-2.7Releasemylib.o:MyLib.c:(.text+0x20a7): undefined reference to `__imp_PyExc_ImportError'
- collect2.exe: error: ld returned 1 exit status
- error: command 'x86_64-w64-mingw32-gcc' failed with exit status 1
- gendef.exe python33.dll
- dlltool.exe --dllname python33.dll --def python33.def --output-lib libpython33.a
- mv libpython33.a C:/Python33/libs
- g++ -c myExtension.cpp -I/other/includes
- g++ -DMS_WIN64 -c myExtension_wrap.cxx -IC:/Python33/include
- g++ -shared -o _myExtension.pyd myExtension.o myExtension_wrap.o -lPython33 -lOtherSharedLibs -LC:/Python33/libs -LC:/path/to/other/shared/libs
- python setup.py -c mingw32
- gcc -c libmypy.c -IC:Users{user_name}Anaconda3pkgspython-3.6.4-h6538335_1include
- gcc -shared -o libmypy.dll libmypy.o -LC:Users{user_name}Anaconda3pkgspython-3.6.4-h6538335_1libs -lPython36
- from ctypes import *
- m = cdll.LoadLibrary(r"C:{path_to_dll}libmypy.dll")
- print(m.hello())
- import distutils.cygwinccompiler
- distutils.cygwinccompiler.get_msvcr = lambda: []
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement