Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
How can I be able to use the software package without first installing it? To be specific, I want to use xml parser,libxm2( http://xmlsoft.org/sources/) in the my C code but I dont want to install it.
You need the headers and shared object files present on your system if you're going to make use of them in your program. Why don't you want to install it? Can you give us more details about the problem you're having?
If you cannot install it system-wide, you can install it for yourself only in your home directory, and remove it completely afterwards.
Typically this means you configure it using ./configure --prefix=/home/myself/libxml2/ other options... and compile and install it there (as yourself). Check the configure options (with ./configure --help); you'll only need a static version of the library.
To compile your own programs, you'll need to tell the compiler to look for libraries ( -L directory ) and include files ( -I directory ) additionally under the libxml2 directory, in this case most likely using -L /home/myself/libxml2/lib -I /homemyself/libxml2/include .
If you compiled the libxml2 library statically (libxml2.a, I believe), then after compiling and linking your own program, you don't need the libxml2 files any longer.
You can use the ldd command to see which dynamic libraries binaries require at run time. If you follow my advice above, you should not have a dependency on libxml2; it should be included in your binary itself.
If you compiled the libxml2 library statically (libxml2.a, I believe), then after compiling and linking your own program, you don't need the libxml2 files any longer.
I have installed libcurl and I want to statically link it to my program but its like its not statically linked. This is how I compiled it:
To answer the original question, you can usually extract the contents of software packages by simply using an unzipping/decompressing tool as they are just a compressed archive. It is still always recommended that they be installed. It would be helpful if you show how you tried to statically link libcurl and what error you encoutered.
It would be helpful if you show how you tried to statically link libcurl and what error you encoutered.
Hi, abhishekbatra; I think I have shown in the previous post how I statically linked libcurl to my app, unless I don't understand you. Actually, as shown in the post, I did not get an error but when using the ldd command to find the shared library dependencies of the app, it gave me a doubt that my app is not statically linked.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.