[SDL] Re: Visual C++
kovacs at mt.lv
Tue Jan 4 01:15:24 PST 2000
i'm using VC++ 6.0 and SDL 1.0 and everything works. Just did what was
writen in VisualC.zip (or whatever), and everything rocks.
----- Original Message -----
From: "Marc Lepage" <mlepage at molecularmining.com>
To: <sdl at lokigames.com>
Sent: otrdiena, 2000. gada 4. janvaris 4:28
Subject: [SDL] Re: Visual C++
> Franck Nouyriga wrote:
> > Hello again,
> > I tried to compile under Window$
> > i get the error ->
> > --------------------Configuration: test1 - Win32
> > Debug--------------------
> > Linking...
> > LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
> > Debug/test1.exe : fatal error LNK1120: 1 unresolved externals
> > Error executing link.exe.
> > But if I put #undef main in my code Visual build it !
> > So why SDL_main.h need #define main .... in that case ?
> > thanks
> I just tried to build under Windows using VC++6 and SDL 1.0.1.
> I found a similar problem, where LIBCD.lib had a warning about default
> libraries, and SDL_main.lib had two errors: multiple definition of _main
> (other in my main object file) and unresolved _SDL_main.
> I followed the advice in the documentation. Investigation revealed that
> SDL/SDLmain.h was in fact defining main to SDL_main. Yet the leading
> underscores bothered me.
> I changed my main to be SDL_main, and the program linked. (It crashes,
> but that's another post.)
> So, where is the leading underscore coming from? Anyone else have that
> Marc Lepage
> Software Developer
> Molecular Mining Corporation
More information about the SDL