|
Static Linking Linux 4.4.2 |
AceBlkwell
Member #13,038
July 2011
|
Edgar, I thought I had statically linked my game in Linux. I found out when I tested the binary files on another machine that I hadn't I guess playing on a machine that had Allegro 4.4.2 installed allows the binary to run. You worked with me on my Windows link. I tried using the same list of files but obviously didn't work. Can you (or anyone) help me with the list of libraries needed to statically link my Linux program. Thanks |
Edgar Reynaldo
Major Reynaldo
May 2007
|
On Linux, you want to use pkg-config to link allegro whether it is statically or dynamically. Here are some various invocations of pkg-config you can use - the first two should work for you (at compile to object, and at link stage) : `pkg-config --cflags --static allegro_monolith-debug-static-5` `pkg-config --libs --static allegro_monolith-debug-static-5` `pkg-config --Cflags allegro_monolith-5` `pkg-config --libs allegro_monolith-5` An example would be : g++ -Wall -Wextra -Wshadow -g -o Main -I `pkg-config --cflags --static allegro_monolith-debug-static-5` Main.cpp Object1.cpp Etc.cpp `pkg-config --libs --static allegro_monolith-debug-static` My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
AceBlkwell
Member #13,038
July 2011
|
Thx Edgar. I don’t usually run from the prompt so I’ll have to see how that works with Eclipse IDE. Ace |
Edgar Reynaldo
Major Reynaldo
May 2007
|
You only need a command prompt to get the libraries you need to link to statically, and the compile flags for static allegro, like -DALLEGRO_STATICLINK. Go to a terminal and type this : echo `pkg-config --flags --libs --static allegro_monolith-debug-static-5` Then take what you need from that and enter it into your eclipse project : I downloaded eclipse to try it out and these seem to be the proper places to put your commands : {"name":"611108","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/b\/3bee0f7d46c65bdda926d9c216504927.png","w":968,"h":1007,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/b\/3bee0f7d46c65bdda926d9c216504927"} My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|