Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    how to get an exe file to run on other computers

    Hello I'm sure this is a simple answer but it's giving me a nightmare. I've compiled some C code on my laptop which runs fine.
    However when I go to run it on another computer it keeps asking for libaries. I load that lib. onto my system and it askes for more .so files. I get the feeling I could be on all day

    All I'm using lib wise are
    LIBARIES= -lGL -lglut `sdl-config --cflags --libs`

    so mesa glut and SDL.

    Do I need to do something in build to get the file useable on other systems?

  2. #2
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Don't quote me on this, but I think what you want is a statically-linked executable that includes the libraries you use in the actual file.
    Registered Linux user #270181

  3. #3
    Moe is completely correct.

    A fully-statically linked file that works on box number one(of a given distro) will work on number two, regardless of the libraries deployed on number two.

    The only time this may not be true is going backward in kernel versions.
    ie., compile on a 2.6 kernel and then try to run on a much older kernel. Your code may or may not work because of changes in system call behaviors - like thread support for example.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts