Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
when I attempt to run my c++ program, I get a linking error
/usr/bin/ld: -lXft not found
my makefile contains a line X-Lib: ..........,-lXft,..........,-lXmc.
when i search for those lib files, i find that all the files in the above line are present as .a files in /usr/lib whereas the one that it complains Xft has a symbolic link to it in the directory /usr/lib.
Can someone tell me how to get around this problem.
Can someone also tell me what is the difference between .a and .so files.
I believe the .a files are archives actually.
ar t <filename>.a
should show you a list of .o files contained in it
.so are shared objects (for dynamic linking) while .o can only (?) be used in static linking
I'm trying to compile my program using my make file.
The only noticeable difference is that all other libraries listed in my make file exist in /usr/X11R6/lib as .a files and the library that creates the problem is present as .so file.
Earlier one of the library path in my makefile for FLTK (a GUI appln that I use along with VTK in my program) contained the following structure
FLTK-LIB: ..................... -libfltk, ......
when I compiled, when linking the program complained that it can't find -libfltk. In the fltk lib directory the name of the library file was libfltk, but for VTK eventhough the library files were named libVTK, in the make file the path was -lVTK. Therefore I decided to change -libfltk to -lfltk and it solved the problem.
you mentioned that libxft was a symbolic link; does the destination of the link exist? if so, look in the make file for a line containing linker options -- often something like LDIR = <some dirs> where the CFLAGS line contains -L$(LDIR) -- and add in the location of the actual object (rather than the link). -L adds extra directories to the path that is search by the linker.
-l<blah> refers to the library blah, whether its a shared object, standard object, or archived object. the filename will have lib prepended to the front. -l is actually an option, and the blah is the argument value
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.