[SDL] SDL_net dev cpp linker problem

Alvin alvinbeach at gmail.com
Fri May 4 05:21:15 PDT 2007


On Friday 04 May 2007 08:58:37 Chris Rajula wrote:
> Hello there!
>
> I'm trying to compile a small program which I've written and uses SDL and
> SDL_net.
>
> Problem is, that I get a couple of these:   [Linker error] undefined
> reference to `SDLNet_TCP_Recv'
> Are there any special flags I should give to the compiler/linker, besides
> from -lSDL?
>
> Can't figure this out, and the documentation provides no help for compiling
> using windows.

-lSDL_net ;)

SDL_net is an addon library - it's not a part of the core SDL library. 
Therefore, you need to specify it when you are linking. This goes for the 
other SDL_????? libraries (e.g. SDL_ttf).

Alvin



More information about the SDL mailing list