[SDL] linking programs with SDL (first time compiling with gcc)

ky@yeah.net ky79 at yeah.net
Wed Jan 7 19:16:00 PST 2004


  ----- Original Message ----- 
  From: John Jung 
  To: sdl at libsdl.org 
  Sent: Thursday, January 08, 2004 11:04 AM
  Subject: [SDL] linking programs with SDL (first time compiling with gcc)


  First of all, thanks to everyone who has been giving me advice so far. Every new piece of information or way to use commands that I haven't seen before is helping a lot.

  ok. I'm now trying to compile using the following line: gcc `sdl-config --cflags` SDLtest.c `sdl-config --static-libs`

  for me --static-libs sends the linker to the right files for all the X11 stuff that wasn't showing up under just plain --libs. (This might not be the best way to resolve the problem with X11. if so let me know.)

  NOW, gcc gives me a much smaller set of errors for its output:

  /usr/lib/libSDL.a(SDL_fbevents.lo)(.text+0x942): In function `find_pid':
  : undefined reference to `__ctype_b'
  /usr/lib/libSDL.a(SDL_fbelo.lo)(.text+0x465): In function `eloSendQuery':
  : undefined reference to `__ctype_toupper'
  /usr/lib/libSDL.a(SDL_fbelo.lo)(.text+0x5f1): In function `eloInitController':
  : undefined reference to `__ctype_tolower'
  collect2: ld returned 1 exit status

  Now how should I go about resolving these? Thanks again for the help with this. Hopefully I'll be asking much more interesting questions soon :) -John



------------------------------------------------------------------------------
  Do you Yahoo!?
  Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes


  i guess try gcc->g++ may help.
  g++ `sdl-config --cflags` SDLtest.c `sdl-config --static-libs`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040107/478adf1f/attachment.htm>


More information about the SDL mailing list