I am wanting to release a program I wrote using SDL/SDL_Mixer/SDL_ttf as a
binary in Linux. I am running into the issue that on different distro’s
different libraries are installed (like one might use GGI where another use
X11 and yet another use Framebuffer). What LDFLAGS should I be using to
ensure the greatest compatability across the board?
(Obviously this is a non-issue for my win32 and mac os X builds)
Just as a note. I have tried these two setups: sdlconfig --libs -lSDL_mixer -lSDL_ttf -static
That one I get an error about libc on another machine
sdlconfig --static-libs -lSDL_mixer -lSDL_ttf
This one it is made about GGI on the other box
Any help would be great.On Monday 04 October 2004 12:10 am, Nathan Grebowiec wrote:
I am wanting to release a program I wrote using SDL/SDL_Mixer/SDL_ttf as a
binary in Linux. I am running into the issue that on different distro’s
different libraries are installed (like one might use GGI where another use
X11 and yet another use Framebuffer). What LDFLAGS should I be using to
ensure the greatest compatability across the board?
(Obviously this is a non-issue for my win32 and mac os X builds)
I am building an app like this:
g++ sdl-config --cflagssdl-config --libs -lSDL_mixer -lSDL_ttf
-static-libgcc -Wno-deprecated -O2 -o game cboard.cpp clickablockextreme.cpp
Even those I am using --libs from sdl-config it is still showing this in ldd
on the “game” binary:
Problem is, when I move it to another box it is complaining abou the lack of
ggi on that machine. I only want it to need SDL and let their SDL be linked
against whatever libs they like.On Thursday 07 October 2004 01:57 am, Jonathan Atkins wrote:
libSDL is linked to ggi
and libSDL_mixer is linked to ogg
ldd shows all dependancies, including dependancies from libraries that you
linked to directly in the first place.
don’t have a cow.
-LIM-
Nathan Grebowiec wrote:
I am building an app like this:
g++ sdl-config --cflagssdl-config --libs -lSDL_mixer -lSDL_ttf
-static-libgcc -Wno-deprecated -O2 -o game cboard.cpp
clickablockextreme.cpp
Even those I am using --libs from sdl-config it is still showing this in
ldd on the “game” binary:
Make sure you’re not linking your binary against GGI yourself. If you’re
using it, make sure “sdl-config --libs” doesn’t list -lggi.On Thu, Oct 14, 2004 at 06:23:11PM -0500, Nathan Grebowiec wrote:
Problem is, when I move it to another box it is complaining abou the lack of
ggi on that machine. I only want it to need SDL and let their SDL be linked
against whatever libs they like.
Problem is, when I move it to another box it is complaining abou the lack of
ggi on that machine. I only want it to need SDL and let their SDL be linked
against whatever libs they like.
They’re prerequsites for the mode you’ve compiled (and/or have
configued) SDL with. If you don’t desire those bits of functionality,
I’m guessing you’ll have to either:
Have to recompile SDL
statically link SDL (sdl-config --static-libs) (remember SDL is
LGPL, closed source projects will need to provide object files and
relinking tools)
Manually disable the automatic dependancy linking with your compiler
(I’m guessing you’ll need to pass
–unresolved-symbols=ignore-in-shared-libs + whatever flag supresses
dependancy linking) - of course your program will crash (I think by
segfault) if there’s init code that allways calls GGI routines, but then
GGI would be a prerequisite anyways for your program’s operation.
Filter out GGI in your makefile if it’s being linked using sdl-config --libs: $(filter-out -lggi,sdl-config --libs)