[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
相關文章
- configure: error: libcurl >= 7.28.0 library and headers are required with suErrorHeaderUI
- 多執行緒的libcurl的使用執行緒
- configure: error: libcurl >= 7.28.0 library and headers are required with support for httpsErrorHeaderUIHTTP
- C++使用libcurl進行http通訊C++HTTP
- C++ LibCurl實現Web指紋識別C++Web
- ENSP Demo 015.1 IPSec_manual
- 基於libcurl實現REST風格http/https的get和postRESTHTTP
- C++ 用libcurl庫進行http通訊網路程式設計C++HTTP程式設計
- mysql database manual(mysql資料庫手冊)MySqlDatabase資料庫
- 全志晶片資料-A10 User Manual晶片
- standby_file_management為manual造成dataguard延遲
- MySQL 8.0 Reference Manual(讀書筆記90節--Replication)MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記68節--Deadlocks)MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記91節--Replication(2))MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記92節--Replication(3))MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記63節--InnoDB Locking)MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記64節--InnoDBTransaction Model)MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記65節--InnoDBLocks Set)MySql筆記BloC
- MySQL 8.0 Reference Manual(讀書筆記94節--Replication(5))MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記45節--Optimization Overview)MySql筆記View
- MySQL 8.0 Reference Manual(讀書筆記93節--Semisynchronous Replication)MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記67節--Phantom Rows)MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記41節-- Data Types(3))MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記40節-- Data Types(2))MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記39節-- Data Types(1))MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記57節--Optimizing for InnoDB Tables)MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記56節--Optimizing Database Structure)MySql筆記DatabaseStruct
- MySQL 8.0 Reference Manual(讀書筆記54節--Optimization and Indexes(1))MySql筆記Index
- MySQL 8.0 Reference Manual(讀書筆記55節--Optimization and Indexes(2))MySql筆記Index
- MySQL 8.0 Reference Manual(讀書筆記53節--Optimizing SQL Statements)MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記80節-- InnoDB Row Formats)MySql筆記ORM
- MySQL 8.0 Reference Manual(讀書筆記69節--InnoDB Startup Configuration)MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記34節-- 字元編碼(1))MySql筆記字元
- MySQL 8.0 Reference Manual(讀書筆記35節-- 字元編碼(2))MySql筆記字元
- MySQL 8.0 Reference Manual(讀書筆記36節-- 字元編碼(3))MySql筆記字元
- MySQL 8.0 Reference Manual(讀書筆記19節-- 日期與計算)MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記46節--Optimizing SELECT Statements(1))MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記47節--Optimizing SELECT Statements(2))MySql筆記
- MySQL 8.0 Reference Manual(讀書筆記38節-- 字元編碼(5))MySql筆記字元