Sponsored Content
Full Discussion: How to include cURL library?
Top Forums UNIX for Dummies Questions & Answers How to include cURL library? Post 302788075 by Ribosome on Monday 1st of April 2013 02:12:37 AM
Old 04-01-2013
How to include cURL library?

Hi,

I've got a project to write a C++ code to open a webpage,read the content and write it in a file. I'm using cURL and compiling the code using G++ in unix. I'm getting compilation error as: "cURL.h: no file or directory".

Can some one please tell me how to install/link this library in unix?

Thanks.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

#include?

I have a file that contains some variables that I may want to share throughout multiple scripts. I think there's an #include command in UNIX. How do I use it (in korn)? (1 Reply)
Discussion started by: yongho
1 Replies

2. Shell Programming and Scripting

How to change a Makefile from building static library to shared library?

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. Linux

Could static library include static library?

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

4. Programming

help with C #include

i have three files a.h t.c and p.c a.h has 3 functions only and does not include anything p.c has one function i made called go t.c has a main function and calls the go function, it includes a.h only i run the program using gcc -Wall -g -o t p.c t.c but i get a warning, implicet... (2 Replies)
Discussion started by: omega666
2 Replies

5. Programming

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... (8 Replies)
Discussion started by: BrandonShw
8 Replies

6. Linux

./configure problem for libsf library due to apparently missing libdb library.

Hello, ./configure script fails to configure libsf. Please check the following last few lines of configure script error. checking for db1/db.h... no checking for db.h... yes checking for dbopen in -ldb1... no configure: error: No libdb? No libsf. But find command shows the following; ... (4 Replies)
Discussion started by: vectrum
4 Replies

7. AIX

Add shared members from library to same library in a different directory

I'm trying to install libiconv to AIX 7.1 from an rpm off of the perzl site. The rpm appears to install but I get this error message. add shr4.o shared members from /usr/lib/libiconv.a to /opt/freeware/lib/libiconv.a add shr.o shared members from /usr/lib/libiconv.a to ... (5 Replies)
Discussion started by: kneemoe
5 Replies

8. Programming

C++ linking library to a library

Hi All, My application main engine will use a shared library where we do many operation. We are trying to implement the linear algebra operation on the shared library for that I need to link my shared library to the lapack library in /usr/lib. Below is my make file. Can you please let me... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies
CURL_SETOPT_ARRAY(3)							 1						      CURL_SETOPT_ARRAY(3)

curl_setopt_array - Set multiple options for a cURL transfer

SYNOPSIS
bool curl_setopt_array (resource $ch, array $options) DESCRIPTION
Sets multiple options for a cURL session. This function is useful for setting a large amount of cURL options without repetitively calling curl_setopt(3). PARAMETERS
o $ch -A cURL handle returned by curl_init(3). o $options - An array specifying which options to set and their values. The keys should be valid curl_setopt(3) constants or their integer equivalents. RETURN VALUES
Returns TRUE if all options were successfully set. If an option could not be successfully set, FALSE is immediately returned, ignoring any future options in the $options array. EXAMPLES
Example #1 Initializing a new cURL session and fetching a web page <?php // create a new cURL resource $ch = curl_init(); // set URL and other appropriate options $options = array(CURLOPT_URL => 'http://www.example.com/', CURLOPT_HEADER => false ); curl_setopt_array($ch, $options); // grab URL and pass it to the browser curl_exec($ch); // close cURL resource, and free up system resources curl_close($ch); ?> Prior to PHP 5.1.3 this function can be simulated with: Example #2 Our own implementation of curl_setopt_array(3) <?php if (!function_exists('curl_setopt_array')) { function curl_setopt_array(&$ch, $curl_options) { foreach ($curl_options as $option => $value) { if (!curl_setopt($ch, $option, $value)) { return false; } } return true; } } ?> NOTES
Note As with curl_setopt(3), passing an array to CURLOPT_POST will encode the data as multipart/form-data, while passing a URL-encoded string will encode the data as application/x-www-form-urlencoded. SEE ALSO
curl_setopt(3). PHP Documentation Group CURL_SETOPT_ARRAY(3)
All times are GMT -4. The time now is 10:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy