Hi all again,
After some poking around I found a fix …
One has to modify the SDL_main function for the case that video is
disabled.
Edit
src/main/win32/SDL_main.c
and supress the (in that case undefined) call to SDL_RegisterApp:
…
#ifndef DISABLE_VIDEO
/* Create and register our class, then run main code */
if ( SDL_RegisterApp(appname, CS_BYTEALIGNCLIENT,
GetModuleHandle(NULL)) < 0 ) {
ShowError(“WinMain() error”, SDL_GetError());
exit(1);
}
#endif
…
Cheers
Andreas
Andreas Schiffler wrote:>
Hi there,
I am using a smaller SDL .DLL using xmingw32 using a subset of the SDL
function that is to be used just for audio playback. This is the
configure line to do that:CONFIGURE_FLAGS="–disable-debug --disable-video --disable-events
–disable-joystick --disable-cdrom --disable-arts --disable-nas"
cross-configure $CONFIGURE_FLAGSI end up with a compact 32k DLL/.so. A Linux test program works well
with this lib using a standard main() routine.My Windows test program has a line like this:
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR
szCmdLine, int iCmdShow)
{
…
}When cross-compiling, I get this error:
usr/local/cross-tools/i386-mingw32msvc/lib/libSDLmain.a(SDL_main.o.bSDL_main.o.b):
In functionconsole_main': /home/andreas/Projects/Libraries/SDL-1.2/src/main/SDL_main.c:166: undefined reference to
SDL_RegisterApp’Any ideas on how to resolve this …?
Ciao
Andreas