F:\pc\mapython_module\mh_how_to_compile_module>python SetUp.py build --compiler=
mingw32
running build
running build_ext
building 'mh' extension
writing build\temp.win32-2.6\Release\src\mh.def
F:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.6\Release\src\cor
e.o build\temp.win32-2.6\Release\src\glmodule.o build\temp.win32-2.6\Release\src
\main.o build\temp.win32-2.6\Release\src\mh.def -LF:\MinGW\lib -LF:\Python26\lib
s -LF:\python26\libs -LF:\python26\PCbuild -lpython26 -lfreeglut -lglu32 -lopeng
l32 -lwinmm -lgdi32 -lpython26 -lmsvcr90 -o build\lib.win32-2.6\mh.pyd
Cannot export initmh: symbol not defined
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1d0): undefined
reference to `SDL_LoadObject'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x214): undefined
reference to `SDL_LoadFunction'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x25c): undefined
reference to `SDL_GetError'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x2d9): undefined
reference to `SDL_FreeSurface'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x3f5): undefined
reference to `SDL_FreeSurface'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x7a5): undefined
reference to `SDL_CreateRGBSurface'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x7c5): undefined
reference to `SDL_LockSurface'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x7d1): undefined
reference to `SDL_FreeSurface'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x7d6): undefined
reference to `SDL_GetError'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x851): undefined
reference to `SDL_UnlockSurface'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x864): undefined
reference to `SDL_RWFromFile'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x878): undefined
reference to `SDL_SaveBMP_RW'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x884): undefined
reference to `SDL_FreeSurface'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x889): undefined
reference to `SDL_GetError'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x8bb): undefined
reference to `SDL_FreeSurface'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x95a): undefined
reference to `SDL_PushEvent'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x991): undefined
reference to `SDL_WM_GrabInput'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0xa04): undefined
reference to `SDL_WM_GrabInput'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x113f): undefined
reference to `SDL_GL_SwapBuffers'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x13be): undefined
reference to `SDL_GL_GetProcAddress'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x13cf): undefined
reference to `SDL_GL_GetProcAddress'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x13e0): undefined
reference to `SDL_GL_GetProcAddress'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x13f1): undefined
reference to `SDL_GL_GetProcAddress'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1402): undefined
reference to `SDL_GL_GetProcAddress'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1413): more unde
fined references to `SDL_GL_GetProcAddress' follow
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x14f2): undefined
reference to `SDL_GetWMInfo'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1b70): undefined
reference to `SDL_PushEvent'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1bf8): undefined
reference to `SDL_SetVideoMode'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1c32): undefined
reference to `SDL_Quit'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1c43): undefined
reference to `SDL_Init'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1c4c): undefined
reference to `SDL_GetError'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1c7c): undefined
reference to `SDL_GL_SetAttribute'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1c90): undefined
reference to `SDL_GL_SetAttribute'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1ca4): undefined
reference to `SDL_GL_SetAttribute'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1cb8): undefined
reference to `SDL_GL_SetAttribute'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1ccc): undefined
reference to `SDL_GL_SetAttribute'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1ce0): more unde
fined references to `SDL_GL_SetAttribute' follow
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1d0d): undefined
reference to `SDL_GetVideoInfo'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1d32): undefined
reference to `SDL_RWFromFile'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1d42): undefined
reference to `SDL_LoadBMP_RW'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1d6b): undefined
reference to `SDL_MapRGB'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1d7f): undefined
reference to `SDL_SetColorKey'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1d8f): undefined
reference to `SDL_WM_SetIcon'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1df7): undefined
reference to `SDL_SetVideoMode'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1e24): undefined
reference to `SDL_GL_SetAttribute'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1e38): undefined
reference to `SDL_GL_SetAttribute'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1e6d): undefined
reference to `SDL_SetVideoMode'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1e96): undefined
reference to `SDL_GL_SetAttribute'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1ecb): undefined
reference to `SDL_SetVideoMode'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1f00): undefined
reference to `SDL_WM_SetCaption'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1f14): undefined
reference to `SDL_EnableKeyRepeat'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1f20): undefined
reference to `SDL_EnableUNICODE'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1f32): undefined
reference to `SDL_InitSubSystem'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1f4f): undefined
reference to `SDL_AddTimer'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1f93): undefined
reference to `SDL_WaitEvent'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x1fc7): undefined
reference to `SDL_WM_GrabInput'
build\temp.win32-2.6\Release\src\glmodule.o:glmodule.c:(.text+0x211b): undefined
reference to `SDL_SetVideoMode'
build\temp.win32-2.6\Release\src\main.o:main.c:(.text+0x34b): undefined referenc
e to `SDL_GetMouseState'
build\temp.win32-2.6\Release\src\main.o:main.c:(.text+0x380): undefined referenc
e to `SDL_GetMouseState'
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
F:\pc\mapython_module\mh_how_to_compile_module>
jcapco wrote:yes ,but it can't solve ,what method you used to build the mh?can you tell me ?thanks.
I use msvc6 and manuel uses compile_module.bat with mingw32. So something must be wrong with your system or the way you do it. Could you post us the output when you type compile_module.bat?