Newbie to SDL with Win32 .... (dev c++)

Hi all, sorry for the dumb question but …

trying to get some simple SDL programs to compile under win32 aswell as
linux, but having trouble with windows
(should i be surprised ??? :wink:

(I’m using dev c++)
how do i get rid of this :

C:\DEV-C_~1\Lib\libmingw32.a(main.o)(.text+0x8e): undefined reference to
`WinMain at 16’

thanks
Clive [Entro-P]
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: InterScan_Disclaimer.txt
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20010604/9a214468/attachment.txt

Looks like you’re not using:

int main ( int argc, char * argv [ ] )

as your “main” function. That, or you’re not linking to SDLmain.lib–

Olivier A. Dagenais - Software Architect and Developer

“Clive Crous” wrote in message
news:74AF1C0430A7D4119DAF0000E88EABBD017C023A at mailsrv.shoprite.co.za

i have : -lsdl -lsdlmain

also, i am using “main”, code works perfect under linux,
i also tried some sdl examples off the net that claim to be cross platform
and they give the same result.
i think it’s a dev c++ problem :confused:

Clive [ Entro-P ]> ----- Original Message -----

From: Olivier Dagenais [mailto:olivier.dagenais@canada.com]
Sent: Monday, June 04, 2001 2:56 PM
To: sdl at lokigames.com
Subject: [SDL] Re: Newbie to SDL with Win32 … (dev c++)

Looks like you’re not using:

int main ( int argc, char * argv [ ] )

as your “main” function. That, or you’re not linking to SDLmain.lib

Olivier A. Dagenais - Software Architect and Developer

“Clive Crous” wrote in message
news:74AF1C0430A7D4119DAF0000E88EABBD017C023A at mailsrv.shoprite.co.za
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: InterScan_Disclaimer.txt
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20010604/009e5852/attachment.txt

Hi!

I just joined this maillinglist ( so this in the archive.)
but i’ve had the extact same problems in Dev-C++

add this line :
-lmingw32 -lSDLmain -lSDL -mwindows

in the “Project->Project Options-> Further Object Files or linker options”

that should do the trick if your compiling a Console App

and remeber to use a main() instead of that silly Winmain() function …

…Kenneth “fessor” Christensen

X-Mailer: Internet Mail Service (5.5.2653.19)

Hi all, sorry for the dumb question but …

trying to get some simple SDL programs to compile under win32 aswell as
linux, but having trouble with windows
(should i be surprised ??? :wink:

(I’m using dev c++)
how do i get rid of this :

C:\DEV-C_~1\Lib\libmingw32.a(main.o)(.text+0x8e): undefined reference to
`WinMain at 16’

thanks
Clive [Entro-P]Subject: [SDL] Newbie to SDL with Win32 … (dev c++)
Date: Mon, 4 Jun 2001 11:12:03 +0200