Compiling SDL Applications With LCC

Compiling SDL Applications With LCC

Post by steve_thom » Sat, 20 Sep 2003 09:01:17


I'm trying to compile an SDL application that I've written using the
latest version of LCC. Unfortunately when I do, I get the following
from the linker:

test1.obj .text: undefined reference to '_SDL_RWFromFile'
test1.obj .text: undefined reference to '_SDL_FreeSurface'
test1.obj .text: undefined reference to '_SDL_SetVideoMode'
test1.obj .text: undefined reference to '_SDL_WasInit'
test1.obj .text: undefined reference to '_SDL_Init'
test1.obj .text: undefined reference to '_SDL_Quit'
test1.obj .text: undefined reference to '_SDL_PollEvent'
main.obj .text: undefined reference to '_WinMain@16'

I've made sure to create an LCC lib using the following:

pedump /exp sdl.dll >sdl.exp
buildlib sdl.exp sdl.lib

This doesn't resolve the problem though.

BTW, my command line invocation is as follows:

lcclnk test.c sdl.lib

Any help would be greatly appreciated,

Steve
 
 
 

Compiling SDL Applications With LCC

Post by Alessi » Sun, 21 Sep 2003 05:30:58

You must link with SDL_main.c too.

Bye.

"Steve Thompson" < XXXX@XXXXX.COM > ha scritto nel messaggio

 
 
 

Compiling SDL Applications With LCC

Post by Alessi » Tue, 23 Sep 2003 03:29:42

...and you must add an underscore to the exported functions into sdl.exp.

Example:

SDL.dll
_SDL_AddTimer
_SDL_AllocRW
_SDL_AudioDriverName
_SDL_AudioInit
...

Bye.

"Alessio" < XXXX@XXXXX.COM > ha scritto nel messaggio
 
 
 

Compiling SDL Applications With LCC

Post by infonee » Wed, 24 Sep 2003 22:13:53

We're you able to get this process to work? I wasn't. Any step-by-step
directions for the "understanding impaired"?

Thanks!
-joe
 
 
 

Compiling SDL Applications With LCC

Post by Alessi » Fri, 26 Sep 2003 08:02:58

I've sent to you an e-mail with a small zipped example.

"joe stewart" < XXXX@XXXXX.COM > ha scritto nel messaggio



sdl.exp.