07-06-2011
Even the Static cURL Library Isn't Static
I'm writing a program which uses curl to be run on Linux PCs which will be used by a number of different users. I cannot make the users all install curl on their individual machines, so I have tried to link curl in statically, rather than using libcurl.so. I downloaded the source and created a libcurl.a static library. However, when I tried to link it in with my program, it showed a lot of disparate undefined references, in other words it had dependencies on other libraries. It would be hard to figure out all the things it's calling for and link in static versions of those libraries too. How do people use curl for programs that are to be distributed to users, most of whom don't have curl libraries on their PCs? How can I use curl in my program completely statically.
Thanks in advance for any enlightenment you can shed.
Brandon
.AOLWebSuite .AOLPicturesFullSizeLink { height: 1px; width: 1px; overflow: hidden; } .AOLWebSuite a {color:blue; text-decoration: underline; cursor: pointer} .AOLWebSuite a.hsSig {cursor: default}
10 More Discussions You Might Find Interesting
1. IP Networking
Is it possible, and if so, how can I assign a static IP address to my RedHat 8.0 machine. I am using a Linksys router/switch with DHCP enabled. I have a small linux/windows2000 LAN at home. I want to assign a static IP so that I can setup port forwarding to my linux machine so that I can ssh into... (7 Replies)
Discussion started by: google
7 Replies
2. Shell Programming and Scripting
Hi:
I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library)
Thanks. (1 Reply)
Discussion started by: cpthk
1 Replies
3. IP Networking
hello, i need help on setting my coyote linux, i've working on this for last 5 days, can't get it to work. I've been posting this message to coyote forum, and other linux forum, but haven't get any answer yet. Hope someone here can help me...... please see my attached picture first.
... (0 Replies)
Discussion started by: dlwoaud
0 Replies
4. Programming
Hi,
The following is my Makefile, I wanted to add a staic library named libtimer.a. I'm using the following Makefile. Please let me know how to add this static library:
Makefile:-
It produces "usbserial" executable.
Thanks,
S (1 Reply)
Discussion started by: suryaemlinux
1 Replies
5. Linux
I have some static library(libxxx.a libyyy.a).
And I want to generate my library(libzzz.a), libzzz.a will use libxxx.a and libyyy.a
I wan't my application only use libzzz.a, (means libzzz.a had include libxxx.a, libyyy.a), how can I do that? Thank you.
example:
I have zzz.c.
I do ... (4 Replies)
Discussion started by: freemagic
4 Replies
6. Programming
I am having a devil of a time with a very simple make file. The program needs two shared and one static library. If I link the shared libraries only like below the mysql test app works
... (1 Reply)
Discussion started by: jadsys
1 Replies
7. Programming
Hello All,
I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it:
I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable
Approach 1 works... (0 Replies)
Discussion started by: magelord
0 Replies
8. UNIX for Dummies Questions & Answers
Hello
Please what does mean shared static library and LD-Preload?
Thank you (3 Replies)
Discussion started by: chercheur857
3 Replies
9. HP-UX
I have solved this but now cannot recall the syntax. I want to strip or change the hard wired library paths on binaries I download from a repository. I do not have root and just want a personal install, but would rather not build every tool. I even posted the solution here once for others, but... (2 Replies)
Discussion started by: DGPickett
2 Replies
10. Shell Programming and Scripting
Hi I am try to use curl to send a static xml file using url encoding to a web page using post. This has to go through a particular port on our firewall as well. This is my first exposure to curl and am not having much success, so any help you can supply, or point me in the right direction would be... (1 Reply)
Discussion started by: Paul Walker
1 Replies
LEARN ABOUT MOJAVE
curlopt_nobody
CURLOPT_NOBODY(3) curl_easy_setopt options CURLOPT_NOBODY(3)
NAME
CURLOPT_NOBODY - do the download request without getting the body
SYNOPSIS
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_NOBODY, long opt);
DESCRIPTION
A long parameter set to 1 tells libcurl to not include the body-part in the output when doing what would otherwise be a download. For
HTTP(S), this makes libcurl do a HEAD request. For most other protocols it means just not asking to transfer the body data.
Enabling this option means asking for a download but without a body.
DEFAULT
0, the body is transferred
PROTOCOLS
Most
EXAMPLE
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* get us the resource without a body! */
curl_easy_setopt(curl, CURLOPT_NOBODY, 1L);
/* Perform the request */
curl_easy_perform(curl);
}
AVAILABILITY
Always
RETURN VALUE
Returns CURLE_OK
SEE ALSO
CURLOPT_HTTPGET(3), CURLOPT_POST(3),
libcurl 7.54.0 February 03, 2016 CURLOPT_NOBODY(3)