Hi,
Thanks for releasing the excellent SDL libraries for different OSes!!
I use Qt library for the user interface and SDL for displaying decoded
MPEG4 frame. I have no problem running my program in Linux until
recently I tried to compiled in win98 using VC++.
The problem I think is that both qt and SDL lib. convert the main function
into Winmain function recognised by windows.
Initially when I compiled with
my main funtion with VC++ as:
int main( int argc, char **argv )
It complains that:
qt.lib(qapplication_win.obj) : error LNK2001: unresolved external symbol
_main
I believe the problem lies in SDL converting the main statement to RunMain
statemant when compiling in windows environment. So, I have tried adding
undefine statement before my main function as:
#undef main
int main(int argc, char **argv)
{
QApplication a(argc,argv);
// …
}
It compiled successfully but SDL_init() gives error i.e.
SDL_Init(SDL_INIT_VIDEO) < 0 .
Please help.
Regards,
Keng Pang
Hi,
Thanks for releasing the excellent SDL libraries for different OSes!!
You’re welcome!
I use Qt library for the user interface and SDL for displaying decoded
MPEG4 frame. I have no problem running my program in Linux until
recently I tried to compiled in win98 using VC++.
The problem I think is that both qt and SDL lib. convert the main function
into Winmain function recognised by windows.
Actually, it doesn’t convert it into WinMain().
I only recently got it working properly with VC++ under Win98.
Try grabbing the latest CVS snapshot from
http://www.devolution.com/~slouken/SDL/download.html
Include SDL.h in your main file, and declare main as:
main(int argc, char *argv[])
Remember not to use a return type, otherwise it will not compile.
I’m not sure how to get it to work with Qt, if Qt takes over WinMain.
Can you send me your code and a sample datafile, so I can take a look?
BTW, you might want to join the SDL mailing list, which is a good place
to ask questions like these. To join, just send e-mail to:
sdl-subscribe at surfnetcity.com.au
Also, I can link to your application from my download page, if you feel
it’s ready for public viewing.
Regards,
Keng Pang
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec