Jump to content
  • Advertisement
Sign in to follow this  
FGFS

Statically Link Sdl

This topic is 775 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi

I do with Eclipse on Ubuntu:

 

Invoking: GCC C++ Linker
g++ -Wl,-Bstatic -lSDL -Wl,-Bdynamic,-rpath=. -shared -o "lin.xpl"  ./main.o ./myList.o   -lopenal -lcurl -lGL
Finished building target: lin.xpl

 

but get sdl errors. How to link statically sdl and later sdl_ttf for a X-Plane plugin.

Thanks

 

Share this post


Link to post
Share on other sites
Advertisement

This may or may not help, but when I compile SDL2 on my Ubuntu Linux machine, I had to have the following options : 

 

g++ -O3 -fPIC -std=c+11 -I/usr/lib -I/usr/include  ..... (object files) ....  -lX11 -lGL -lGLU -lGLEW -lSDL2 -lSDL2_image -lSDL2_mixer -o program.exe

 

Some of those are probably redunant (e.g. -fPIC) but I had 'fun' getting it working and just left everything in there when it finally worked!  Might not help, but just in case...

Share this post


Link to post
Share on other sites

but get sdl errors

 

 

 

What errors? We cannot read your mind, and so unless you provide the actual error text (actual error text, copy-and-pasted, don't re-write it from memory) there's not a whole lot anybody can do but guess. 

Share this post


Link to post
Share on other sites

@sergamer I use sdl1.2 and static linking

@Josh

 

I do with Eclipse on Ubuntu:

Invoking: GCC C++ Linker
g++ -Wl,-Bstatic -lSDL -Wl,-Bdynamic,-rpath=. -shared -o "lin.xpl" ./main.o ./myList.o -lopenal -lcurl -lGL
Finished building target: lin.xpl

without -lSDL at the end I get sdl-quit not found or alike errors. How to link statically sdl and later sdl_ttf for a X-Plane plugin.
Thanks

 

For Ubuntu dynamic linking is ok, but I don't want to ship sdl and sdl_ttf with my app on other os.

Share this post


Link to post
Share on other sites

without -lSDL at the end I get sdl-quit not found or alike errors


the actual error text (actual error text, copy-and-pasted, don't re-write it from memory)

Share this post


Link to post
Share on other sites

With:

Invoking: GCC C++ Linker
g++ -Wl,-Bstatic -lSDL -Wl,-Bdynamic,-rpath=. -shared -o "lin.xpl"  ./main.o ./myList.o   -lopenal -lcurl -lGL
Finished building target: lin.xpl

 

I get:

dlerror:/media/michael/DATA/X-Plane_10/Aircraft/General Aviation/P4/plugins/p4/64/lin.xpl: undefined symbol: SDL_Quit

 

Many thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!