[Libcurl]Build&Use Manual
Version
- Visual Studio 2013
- curl-7.53.1.zip(download)
Build libcurl static library
1 Extract curl-7.53.1.zip to a local directory(c:\libcurl)
2 Open VS2013 x86 Native Tools Command Prompt
3 cd c:\libcurl\winbuild
4 Compile
/MD
nmake /f Makefile.vc mode=static VC=12
/MT
nmake /f Makefile.vc mode=static VC=12 RTLIBCFG=static
Static linking of Microsoft’s C RunTime (CRT)
If you are using mode=static nmake will create and link to the static build of
libcurl but not the static CRT. If you must you can force nmake to link in
the static CRT by passing RTLIBCFG=static. Typically you shouldn’t use that
option, and nmake will default to the DLL CRT. RTLIBCFG is rarely used and
therefore rarely tested. When passing RTLIBCFG for a configuration that was
already built but not with that option, or if the option was specified
differently, you must destroy the build directory containing the configuration
so that nmake can build it from scratch.
5 Build result in C:\libcurl\builds\libcurl-vc12-x86-release-static-ipv6-sspi-winssl
Link Against libcurl in Visual Studio
1 cd C:\libcurl\builds\libcurl-vc12-x86-release-static-ipv6-sspi-winssl
2 copy include&lib directories to your solutions directory
3 Configuration Properties > C/C++ > General > Additional Include Directories: add * $(SolutionDir)\include\ *
4 Configuration Properties > C/C++ > Preprocessor > Preprocessor Definitions: add CURL_STATICLIB
5 Configuration Properties > Linker > General > Additional Library Directories: add * $(SolutionDir)\lib\ *
6 Configuration Properties > Linker > Input > Additional Dependencies: add libcurl_a.lib
Test libcurl in Your Project
#include <stdio.h>
#include <curl/curl.h>
int main(int argc, char* argv[])
{
CURL *curl = curl_easy_init();
if (curl) printf("curl_easy_init() succeeded!\n");
else fprintf(stderr, "Error calling curl_easy_init().\n");
return 0;
}
Refer
相關文章
- libcurl教程
- Libcurl簡明使用指南
- 多執行緒的libcurl的使用執行緒
- Explicit (Manual) Data Locking (364)
- C++使用libcurl進行http通訊C++HTTP
- 開源的網路協議庫LibCurl協議
- GNU make manual 翻譯(五十九)
- httpd的manual列目錄漏洞httpd
- GNU make manual 翻譯(三十六)
- C++ LibCurl實現Web指紋識別C++Web
- 【Curl(libcurl)開發之二】Cocos2dx之深入(libcurl)的curl_easy_setopt引數詳細介紹!
- libcurl多執行緒超時設定不安全執行緒
- 全志晶片資料-A10 User Manual晶片
- mysql database manual(mysql資料庫手冊)MySqlDatabase資料庫
- Help & Manual 3.0.4.619 破解 (15千字)
- 近期oracle upgrade book and rac manual 手記Oracle
- ENSP Demo 015.1 IPSec_manual
- windows下curl報錯:curl : (1) Protocol https not supported or disabled in libcurlWindowsProtocolHTTP
- manual database deletion for oracle10g on solaris10DatabaseOracle
- GNU make manual 翻譯( 一百二十三)
- configure: error: libcurl >= 7.28.0 library and headers are required with support for httpsErrorHeaderUIHTTP
- manual database creation for oracle10g on solaris10DatabaseOracle
- oracle實驗記錄 (PGA manual or auto 與hash join)Oracle
- MySQL 8.0 Reference Manual(讀書筆記90節--Replication)MySql筆記
- 基於libcurl實現REST風格http/https的get和postRESTHTTP
- C++ 用libcurl庫進行http通訊網路程式設計C++HTTP程式設計
- 編譯支援iOS的libcurl+OpenSSL庫(支援https IPv6)編譯iOSHTTP
- iOS 使用libcurl 獲取網路請求各階段的時間iOS
- C++用libcurl庫進行http網路通訊程式設計C++HTTP程式設計
- oracle9i(9204)_manual deletion of db_引注Oracle
- [20151201]Manual Remastering of ObjectsREMASTObject
- MySQL 8.0 Reference Manual(讀書筆記64節--InnoDBTransaction Model)MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記65節--InnoDBLocks Set)MySql筆記BloC
- MySQL 8.0 Reference Manual(讀書筆記68節--Deadlocks)MySql筆記
- Oracle OCP 1Z0 Q418(Memory Management Manual)Oracle
- Use case driven" means writing the user manual first, then writing the code
- 《CSS實戰手冊》(CSS: The Missing Manual)中文勘誤列表CSS
- MySQL 8.0 Reference Manual(讀書筆記63節--InnoDB Locking)MySql筆記