|
How to link staticly must-run everywhere Linux executable ELF |
Raf256
Member #3,501
May 2003
|
How can I build a proram so that it will run on almost every Linux? g++ alien_main.o alien_seed1.o [...] test_a.o -lm `allegro-config --libs --static` -o alien.linux.i386.static.elf --static /usr/local/lib/liballeg.a(umodules.o)(.text+0x1d9): In function `_unix_load_modules': : undefined reference to `XRenderFindStandardFormat' collect2: ld returned 1 exit status What can I do about it? What if I would need to use allegroGL and GL, GLUT libraries? |
Evert
Member #794
November 2000
|
Quote: How can I build a proram so that it will run on almost every Linux? Distribute source. Quote: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking I've never actually seen this produce a problem when the program is run. I think you need to disable modules in Allegro to get rid of this. Quote: undefined reference to `XRenderFindStandardFormat' You need to bring in an extra library for the linker. I think you can do ldd /usr/lib/libXcursor.a and cross-reference with the output of allegro-config --libs to see which one you need to link in. |
Thomas Fjellstrom
Member #476
June 2000
|
It looks like it wants the XRender lib. -- |
Kitty Cat
Member #2,815
October 2002
|
I think the last --static on the command line should be -static. That causes even dynamic libraries to be static-linked. However, shared libraries that are themselves dynamic linked with other libs may need to have those extra libs explicitly specified. -- |
Raf256
Member #3,501
May 2003
|
Well I can not give the source, I will play with that link options... how to disable modules in Allegro compilation? |
Evert
Member #794
November 2000
|
Quote: - not everyone have time to recompiles, its not lny by programmers - for programmers program
No, but if you were to release source then others could contribute compiled versions for different distributions. Distributions might even ship the compiled version. Of course, they probably won't if it's a commercial project. Quote: I will play with that link options... how to disable modules in Allegro compilation? Check the configure options (./configure --help). I think it's something like --disable-modules. |
|