ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
now my mission is to give this GLUT-dependent application to someone who is running RedHat 7 and lacks some of these libraries (most, to my knowledge).
can someone tell me how i can statically link in all the relevant libraries such that he can execute the binary on his system without having to install ANYTHING whatsoever?
if so, where can i get all the relevant libraries (i'm new to linux-programming, and as such don't have much of a clue when it comes to this sort of issue).
if anyone can help, please give me step-by-step instructions.
btw g++ is just like gcc with libstdc++ linked automatically. also your makefile kinda misses the entire point of makefiles. the idea is if one source file changes the others do NOT have to be recompiled. i havnt written a makefile in a long time but maybe something like this:
you need to locate a libglut.a, im not at all familiar with rpm based distros so i cant really tell you where to look, all i can say is i got glut from mesa, so maybe mesa-version-devel.rpm may contain it but i find it very surprising that you have the libglut headers/shared libraries without the static archive.
ignore this post unless MasterC's rpm doesnt have what you need
what you downloaded was(i think) a source distribution, unpack mesalib, cd into the directory and do
./configure --help | less
now you want to find the options to enable the build of static libraries and to make glut. dont worry about the prefix option your not gonna install it, once you have chosen your options do another ./configure but with the options you want, hopefully that'll run without error, then do make, hopefully that will also run without error. now somewhere(sometimes in a hidden directory) should be libglut.a copy that to your source directory
now in your make file replace -lglut with /path/to/libglut.a and all should go well, i hope.
i have a libglut.a but its optimised for an athlon-xp so its probably no good to you.
refer to my first post in this thread.
every library there had to have its '.a' counterpart.
i eventually got them all (save the last two) and started getting more strange (linking) errors. i think i popped a vessel.
i've got to say, its not really in my spirit to quit but this struggle has lead me to believe that even if i do get it working on my distro, it most likely won't work on any other one.
so i'm going to just try the shared library approach.
i'm also quite keen to hear from higher authorities how static linking (in an X11 context) is supposed to be done.
your help has been invaluable, though.