Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Compile game with allegro not installed

This thread is locked; no one can reply to it. rss feed Print
Compile game with allegro not installed
cecco4
Member #15,659
June 2014

Hi, as i write on the title i'm wondering if it's possible to compile an allegro 5 game on a linux machine without allegro installed.

Arthur Kalliokoski
Second in Command
February 2005
avatar

SSH into somebody else's box and ftp the executable?

They all watch too much MSNBC... they get ideas.

cecco4
Member #15,659
June 2014

That is a pretty intricate method, does i need to have another running computer with allegro installed and make a static compilation?
Is not possible to include all the prebuilt dependencies in the game package and then built the stuff in another computer?

Thomas Fjellstrom
Member #476
June 2000
avatar

You would have to include the allegro headers along with the libraries in order to compile code that uses allegro.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

cecco4
Member #15,659
June 2014

I tried to put all the allegro headers, lib and compile with:
g++ -Wall -o game -I../lib/include -L../lib -lallegro -lallegro_acodec -lallegro_audio -lallegro_color -lallegro_font -lallegro_image -lallegro_main -lallegro_primitives -lallegro_ttf

on my pc no problem, but i think the compilator is still using the installed one, so i don't know if this would work on another pc.

Thomas Fjellstrom
Member #476
June 2000
avatar

Try it on another computer. Or in a virtual machine.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

cecco4
Member #15,659
June 2014

For the include step no problem, also linking the allegro lib look ok;
But then i had this error:

/usr/bin/ld: warning: libdumb.so.1, needed by ../lib/liballegro_acodec.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopenal.so.1, needed by ../lib/liballegro_audio.so, not found (try using -rpath or -rpath-link)
../lib/liballegro_audio.so: riferimento non definito a "alDeleteBuffers"
../lib/liballegro_audio.so: riferimento non definito a "alcMakeContextCurrent"
../lib/liballegro_acodec.so: riferimento non definito a "dumbfile_open_ex"
../lib/liballegro_audio.so: riferimento non definito a "alGenSources"
../lib/liballegro_acodec.so: riferimento non definito a "dumb_read_xm"
../lib/liballegro_acodec.so: riferimento non definito a "unload_duh"
../lib/liballegro_audio.so: riferimento non definito a "alGetError"
../lib/liballegro_audio.so: riferimento non definito a "alDistanceModel"
../lib/liballegro_audio.so: riferimento non definito a "alSourceQueueBuffers"
../lib/liballegro_acodec.so: riferimento non definito a "register_dumbfile_system"
../lib/liballegro_audio.so: riferimento non definito a "alcOpenDevice"
../lib/liballegro_acodec.so: riferimento non definito a "dumb_read_it"
../lib/liballegro_audio.so: riferimento non definito a "alSourcei"
../lib/liballegro_acodec.so: riferimento non definito a "duh_render"
../lib/liballegro_audio.so: riferimento non definito a "alGetSourcei"
../lib/liballegro_acodec.so: riferimento non definito a "duh_start_sigrenderer"
../lib/liballegro_audio.so: riferimento non definito a "alDeleteSources"
../lib/liballegro_acodec.so: riferimento non definito a "duh_get_length"
../lib/liballegro_audio.so: riferimento non definito a "alSourceUnqueueBuffers"
../lib/liballegro_audio.so: riferimento non definito a "alcDestroyContext"
../lib/liballegro_audio.so: riferimento non definito a "alSourcePlay"
../lib/liballegro_audio.so: riferimento non definito a "alcCreateContext"
../lib/liballegro_audio.so: riferimento non definito a "alBufferData"
../lib/liballegro_audio.so: riferimento non definito a "alGenBuffers"
../lib/liballegro_acodec.so: riferimento non definito a "duh_end_sigrenderer"
../lib/liballegro_audio.so: riferimento non definito a "alSourcef"
../lib/liballegro_audio.so: riferimento non definito a "alcCloseDevice"
../lib/liballegro_acodec.so: riferimento non definito a "dumb_read_mod"
../lib/liballegro_audio.so: riferimento non definito a "alcGetError"
../lib/liballegro_acodec.so: riferimento non definito a "dumb_exit"
../lib/liballegro_acodec.so: riferimento non definito a "duh_sigrenderer_get_position"
../lib/liballegro_acodec.so: riferimento non definito a "dumb_read_s3m"
../lib/liballegro_audio.so: riferimento non definito a "alGetEnumValue"
../lib/liballegro_audio.so: riferimento non definito a "alSourceStop"
collect2: error: ld returned 1 exit status
make: *** [Game] Errore 1

i tried to add libdumb.so.1 and libopenal.so.1 in the lib folder but is like i cant copy it.

Gideon Weems
Member #3,925
October 2003

That does not surprise me. A SpeedHack entry or two had similar problems with the audio add-on and DUMB. And now, I'm having similar problems when static linking.

cecco4
Member #15,659
June 2014

I successfully copied the 2 lib in the game folder, i don't know why ubuntu didn't let me copy the library but with the virtualbox pc i was able to do that.
Now in the virtual pc all seem working good, however i will later try in another real computer.

thank you, guys.

edit:
I finally tried with another pc and i had this error:
../lib/liballegro.so: undefined reference to `__fdelt_chk@GLIBC_2.15'
../lib/libdumb.so.1: undefined reference to `__pow_finite@GLIBC_2.15'

i think that the library are compiled for a different version of c.

Go to: