problems compiling irrklang using code in ubuntu
BlitzMax Forums/BlitzMax Programming/problems compiling irrklang using code in ubuntu
| ||
Hi, I must say, I'm a bloody noob in Ubuntu. I tried to compile my game which uses bah.irrklang.mod and the irrklang lib, but it's not working. I always get the error: Building Start Compiling:Start.bmx flat assembler version 1.64 4 passes, 0.8 seconds, 8286662 bytes. Linking:Start.debug /usr/bin/ld: cannot find -lirrKlang collect2: ld returned 1 exit status Build Error: Failed to link /home/firstdeathmaker/Desktop/RazoonExt/Start.debug Process complete How can I install the irrklang.lib? I tried to copy the lib to usr/local/lib/ in sudo mode (cause normal doesn't work) but it tells me that the target is no directory, although it is. I'm a little confused... |
| ||
I think what I did, for libraries, was to add the /blitzmax/lib path to ldconfig ('sudo gedit /etc/ld.so.conf'); and put the .lib/.a (?) in your /blitzmax/lib folder. |
| ||
Sorry, but I dont get it really. My Blitzmax folder is: home/firstdeathmaker/Programme/BlitzMax I put libIrrklang.so intro home/firstdeathmaker/Programme/BlitzMax/lib I opened Id.so.conf as you described, and wrote into that empty file: home/firstdeathmaker/Programme/BlitzMax/lib When I try to save the file, an error occures: File /ect/Id.so.conf was not able to be saved. Unexpected Error: File not found |
| ||
There are a few things you can do to get a shared object recognized by the system. The first is to place it in a standard location, like /usr/lib or /usr/local/lib. If you don't want to do that (or don't have rights to go there), you can use it from a different folder, but you'll need to set things up for the system to find it. There are two ways you can do that. One is to set the environment variable LD_LIBRARY_PATH. You can set it like so : export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/my/path/to/lib The other way, as Plash describes, is to edit /etc/ld.so.conf and add the path to that file. The path should begin with a / To see what shared objects the system can see, you can run this command ldconfig -p It'll probably be a big list... Note, that the export (of LD_LIBRARY_PATH) will last only as long as the current session it was run from. For many apps and games on Linux, it is often the case that a shell script is used to start it, which will set up all the required paths/config before running the app itself. |
| ||
You may want to consider keeping all your folders in lowercase and spaceless aswell. It really really helps. |
| ||
Hmm, still not working. What I did: I put (via sudo cp ) the library: libIrrKlang.so into usr/lib/ & tried to run it I put (also via sudo cp) the library libIrrKlang.so into usr/local/lib & tried to run it I used export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/firstdeathmaker/ & put libIrrKlang.so into my home directory home/firstdeathmaker/ & I used export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/firstdeathmaker/Desktop/ & left the file on my desktop. And all the time I get the error: Building Start Compiling:Start.bmx flat assembler version 1.64 4 passes, 0.9 seconds, 8286662 bytes. Linking:Start.debug /usr/bin/ld: cannot find -lirrKlang collect2: ld returned 1 exit status Build Error: Failed to link /home/firstdeathmaker/Desktop/RazoonExt/Start.debug Process complete |