Setting up on Linux Mint

edited January 2013 in Help request
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

  • edited January 2013
    Hi Mitch, and welcome here!

    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!
  • edited January 2013
    That'd be great, I had downloaded 1.4rc0 linux-32 tutorial package from the downloads section, would I be better off using the hg repository?
  • edited January 2013
    In the past, releases were very sparse as they were excruciating to make, but thanks to the work we did with premake & buildbot, that's not the case anymore so not using the hg repo isn't a big deal anymore.

    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.
  • edited January 2013
    K, I got it working, had to put the library files into /lib or it wouldn't run, but would compile okay. Thanks for the help.
  • edited January 2013
    move them to /usr/local/lib/. /lib is for system files. /usr/local is for files the user wants the system to use. Makes it easier for you to keep track of everything, and add/remove libraries as needed.
Sign In or Register to comment.