
(임시/미해결)Visual Studio 2017에서 curl 라이브러리 설치하고 사용하기
LNK2019 오류가 날 수 있으니 혹시라도 검색해서 오신 분은 다른 방법을 권장드립니다
버전
Microsoft Visual Studio Community 2017
Version 15.3.3
VisualStudio.15.Release/15.3.3+26730.12
Microsoft .NET Framework
Version 4.7.02053
Installed Version: Community
0. https://curl.haxx.se/download.html 에서 최신 버전을 다운
1. libcurl을 사용할 프로젝트에 include, lib 디렉토리 생성
2. $(ProjectDir)\include에 curl-7.57.0\include\curl를 복사
3. curl-7.57.0\projects\Windows\VC14cul-all.sln 열기
4.
Build - Batch Build를 눌러서
Project : libcurl
Configuration : LIB Release
Platform : x86
Project : libcurl
Configuration : LIB Debug
Platform : x86
이 2개를 선택하고 Build 클릭
(둘 모두 x64를 했다가 계속 LNK2019 오류가 나서 포기)
5. curl-7.57.0\build\Win64\VC14 경로에 lib 생성
6. $(ProjectDir)\lib에 libcurld.lib, libcurl.lib복사
7.
프로젝트의 Properties에서
Configuration은 All Configurations
플랫폼은 전부 All Platforms
Configuration Properties - C/C++ - General - Additional Include Directories에 아래 추가
"$(ProjectDir)\include"
Configuration Properties - Linker - General - Additional Library Directories에 아래 추가
"$(ProjectDir)\lib"
8.
프로젝트의 Properties에서
Configuration은 Debug
플랫폼은 x86
Configuration Properties - Linker - Input - Additional Dependencies 뒤쪽에 아래 추가로 적기
libcurld.lib;
프로젝트의 Properties에서
Configuration은 Release
플랫폼은 x86
Configuration Properties - Linker - Input - Additional Dependencies 뒤쪽에 아래 추가로 적기
libcurl.lib;
9. Debug, x86로 설정하고(x64도 필요하면 같은 방법으로) 이후 원하는 프로젝트 빌드
10.
#include <curl/curl.h>
#include <curl/easy.h> 두 파일을 결국 Solution Explorer에서 헤더 쪽에 추가해 줬다.
11. 계속 LNK2019 오류가 발생...
Leave (임시/미해결)Visual Studio 2017에서 curl 라이브러리 설치하고 사용하기 to:
Read more #programming posts
Best Posts From otgw
We have not curated any of otgw's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.