[SDL] SDL Compilation Documentation
toppij at blacktoppstudios.com
Fri Nov 25 12:23:45 PST 2011
Every time I am about to give up an move on somebody explains
something and shows me exactly what I need, or should be researching.
I will definitely look into this.
On Fri, Nov 25, 2011 at 1:48 PM, Patrick Baggett
<baggett.patrick at gmail.com> wrote:
>> Dynamic linking with a similar copy process also just works on windows
>> and Linux. I also ran a number of other experiments. The output from
>> `make install` will not be linked against no matter where I put it,
>> even though there is a libSDL.a and it is a folder that the manually
>> copied libSDL.a was in, the linker will produce "could not find
> The TL;DR -- you need to link to various Windows libraries. Google the
> function name (without the @<n> trail). For example "joyGetNumDevs" links to
> the msdn page. At the bottom is the name of DLL that has the function. Add
> -lname to the link line. For example "joyGetNumDevs" is in "winmm.dll", so
> add "-lwinmm". Rinse, repeat until all symbols are resolved.
> Why: When you use a DLL, these symbols are already resolved (i.e.
> someFunction() -> someDLL.dll) at link time, but when you use a static
> library, the references are left unresolved. In fact, using a static library
> is not any different than just copy/pasting the *.c/*.o file into your
> project -- just how you have to use -lSDL to link with SDL, SDL must do
> -lsomefile to link against the Windows APIs it uses. Thus if you need "-lfoo
> -lSDL" to link, and SDL needs "-lbar -lbaz", then your link line should be
> the concatenation of the two. "-lfoo -lSDL -lbar -lbaz". Pretty much every
> Win32 API has the "@<n>" on the trail due to the so-called "stdcall" calling
> convention. The details aren't important, but when you see "function at 12",
> you can pretty much be sure that it is a Windows library, so Google it and
> add it to the link line.
> Just scanning the list, you need "winmm32.dll" and "imm32.dll"
> SDL mailing list
> SDL at lists.libsdl.org
- Joe Toppi
BlackTopp Studios Inc.
Lead Software Developer
Toppij at BlackToppStudios.com
More information about the SDL