Compiling SDL-1.2.12 with cbuilder6

I cant compile sdl with cbuilder. I’ve:
Downloaded-unzipped, unzipped borland folder within the main sdl folder,
reached the subfolder where the bpg file and all of bcb projects are, opened
libSDL.bpg with cbuilder6, verified that it has “treat enums as ints” checked,
instantiated a Build All Projects… it stops when looks for testtypes.c, that
is not present (searched) anywere in the folder nor in the whole pc.
I’ve tried to remove every reference to this file in libSDL.bpg, than had the
same problem with Aliens.c, then had problems with audio and removed related
references from SDL.bpr, than with another file I can not remember now…
Finally i was able to compile but a lot of linker error (…"Unresolved… )
stopped me from having a final SDL.dll produced.
I have also tried to download the w32 runtime SDL.dll, put it in windows\
system\ and system32\ folders but i keep on being unable to have the needed
functions working.
I’m quite unexperienced with high level programming.
Anyway it seems to me that putting an #include<SDL.h> in the header of a
cbuilder6 new application project, around where vcl.h is also included by
default, then calling SDL_Init(SDL_INIT_JOYSTICK) inside a form onActivate call
should compile and link with no error…
In my case this does not link (…“Unresolved external _SDL_init…”…).

HELP!
I’ve tried this on two different pc’s, many times and have spent days with no
result.
I just need for reading a joystick…
Hope someone can point me somehow out of this stall…

El Monday 05 November 2007 11:13:08 Francesco escribi?:

In my case this does not link (…“Unresolved external _SDL_init…”…).

Unresolved external symbol errors at linking time are usually issued when you
don’t tell the linker what additional libraries/objetcs you will also need,
in this case SDL’s. I think you have to tell your linker you want to use
"sdl.lib" and “sdlmain.lib”, if I remember correctly.

El Monday 05 November 2007 11:13:08 Francesco escribi?:

In my case this does not link (…“Unresolved external _SDL_init…”…).

Unresolved external symbol errors at linking time are usually issued when
you
don’t tell the linker what additional libraries/objetcs you will also
need,
in this case SDL’s. I think you have to tell your linker you want to use
"sdl.lib" and “sdlmain.lib”, if I remember correctly.

Yeah, exactly. I don’t know how to set linker flags in cbuilder, but you
need these flags:

-lSDLmain -lSDL

If that doesn’t work, make sure you have actually put these libraries where
the linker will find them. The libraries may have a “.a” extension… Read
your linker documentation to learn how to set library search paths, etc…

----- Original Message -----
From: aluaces@udc.es (Alberto Luaces Fernandez)
To: "A list for developers using the SDL library. (includes SDL-announce)"
Sent: Monday, November 05, 2007 8:01 AM
Subject: Re: [SDL] compiling SDL-1.2.12 with cbuilder6