Hey, I checked out both of the Linux tutorials on the wiki, followed the instructions, installed the dependencies. Figured I would start out with the first tutorial for creating an object so I copied the code into my main.c, it builds okay, but when I try to run it I just get a terminal window with:
./Orx: error while loading shared libraries: liborxd.so: cannot open shared object file: No such file or directory
But if I move that file or rename it, it won't build at all so it seems to be picking it up one way or another. I'm not really used to using an IDE, I do most of my coding with vim and set up everything following the tutorials.
Any help would be great, thanks.
Comments
Which version of orx are you using, the latest from the hg repository or the 1.4rc0? Also, which version of linux are you using/targeting, a 32bit or a 64bit one?
I've never used the tutorials myself, to be honest, and they might be slightly outdated. Things should be much easier now that we're using premake for generating build files.
I'll give it a try on my own linux box tonight and will post here a full step-by-step howto.
Cheers!
You can still use the repo if you want to have everything at hand (including more examples and source) and/or if you want latest features/fixes.
That being said, using the dev package should be pretty straightforward.
Here are the steps, assuming orx is in orx-1.4rc0/dev-linux32:
- compile your program using -I orx-1.4rc0/dev-linux32/include
- link it with -L orx-1.4rc0/dev-linux32/lib -lorx (or lorxp/lorxd depending on which version you are using)
- don't forget to specify -D __orxDEBUG__ when compiling if you are using the debug version of orx
- Add liborx.so/liborxp.so/liborxd.so to your LIBPATH
*OR* link with: -Wl,-rpath ./
this will make sure your program is looking in its own directory to find orx's .so (in which case don't forget to copy them in the same directory as your executable).
If you're compiling the 32bit version on a 64bit linux, don't forget to add -m32 to the command line otherwise there'll be a mismatch between your 64bit executable and the 32bit orx library.
Of course, you can compile orx as a static library if you'd rather, in which case you won't have any dynamic library issue.
Let me know if that worked for you.