I am porting my little SDL/OpenGL app to windows. Everything is fine except the linker is complaining that _SDL_main is not found. I have included the libraries and the DLL is in the right directory (with the executable). I finds all the other SDL related symbols just not this one symbol.
Any ideas?
Robin.
“Robin Forster” <robin.forster at sympatico.ca> wrote in message
news:mailman.1010975884.13188.sdl at libsdl.org…
I am porting my little SDL/OpenGL app to windows. Everything is
fine
except the linker is complaining that _SDL_main is not found. I
have included the libraries and the DLL is in the right directory
(with the executable). I finds all the other SDL related symbols
just not this one symbol.
Any ideas?
Make sure that the file that defines the function ‘main’ contains this
line:
#include “SDL.h”
Also make sure you are linking with ‘SDLmain.lib’.–
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games - http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
Rainer Deyke wrote:
Make sure that the file that defines the function ‘main’ contains this
line:
#include “SDL.h”
Also make sure you are linking with ‘SDLmain.lib’.
Hi. Are there situations where linking to ‘SDLmain.lib’ is not required?
The reason I ask is because I have been able to successfully build
executables while linking only to SDL.lib. FWIW, my OS/compiler are
WinXP/Borland’s free C++ compiler.
Thanks,–
Ney Andr? de Mello Zunino
I think windows expects something as: int main(int, char**).
I changed my int main() to that and then it linked fine.
MattijsOn Sunday 13 January 2002 21:35, you wrote:
I am porting my little SDL/OpenGL app to windows. Everything is fine
except the linker is complaining that _SDL_main is not found. I have
included the libraries and the DLL is in the right directory (with the
executable). I finds all the other SDL related symbols just not this one
symbol.
Any ideas?
Robin.
I think windows expects something as: int main(int, char**).
I changed my int main() to that and then it linked fine.
Strictly speaking you should always define main with at least the first 2
parameters, most commonly as:
int main(int argc, char *argv[])
Yours,
Andy GordonOn Mon, 14 Jan 2002, Mattijs de Groot wrote:
QueriX UK
36A London Road http://www.querix.co.uk
Southampton
Tel: +44 23 8023 2345 andy at querix.co.uk
Fax: +44 23 8039 9685