Published: 31 Oct 2018 › Updated: 31 Oct 2018
curl 7.61.1 vs2017 static library build(MT/MTD) ( with LIB OpenSSL )
:: 이 내용은 아래의 구성의 빌드에만 유효하다.
- LIB Debug - LIB OpenSSL
- LIB Release - LIB OpenSSL
folder 구조
3rdparty 라이브러리 셋팅
2-1. openssl (https://www.npcglib.org/~stathis/blog/precompiled-openssl/)- openssl-1.1.0f는 아직 curl 빌드에 연동되어 있지 않기 때문에 기존 1.0.2l 버전을 사용한다. 참고 : 1.1.0f로 바뀌면서 기존 libeay32 => libcrypto, ssleay32 =>libssl로 명칭이 변경되었다.
- openssl-1.0.2l-vs2017.7z 다운로드 후 압축 해제
-
lib 폴더에 precompiled 된 바이너리들 확인 (libeay32MTd.lib, ssleay32MTd.lib, libeay32MT.lib, ssleay32MT.lib)
추후 프로젝트에서 사용 하기 위해 static binary가 필요함.
libcurl static 빌드에는 lib파일 없이 빌드 성공 할수 있다. curl.exe 빌드에만 필요하다.
curl.exe 도 빌드 성공하고 싶다면 아래와 같이 복사 해준다.
root/openssl/build/win32/vc15/LIB Debug 에 libeay32MTd.lib, ssleay32MTd.lib를 복사해서 넣는다.
root/openssl/build/win32/vc15/LIB Release 에 libeay32MT.lib, ssleay32MT.lib를 복사해서 넣는다. - include/openssl폴더 통체로 root/inc32/openssl에 붙여 넣기 한다.
curl 셋팅
3-1. download (https://curl.haxx.se/download.html)- 'Windows 32bit 7.61.1 binary the curl project' download
- root/curl-7.61.1 에 압축 풀어준다.
- root/curl-7.61.1/projects/Windows/VC15/curl-all.sln 로 솔루션을 연다.
3-2. libcurl 빌드만 성공하고 curl 빌드가 필요 없다면 아래 구성 내용 수정 할 필요가 없다.
- curl 프로젝트 => 속성
LIB Debug - LIB OpenSSL 구성 선택 => 링커 => 입력 에 libeay32.lib 를 libeay32MTd.lib, ssleay32.lib를 ssleay32MTd.lib 로 각각 수정한다.
LIB Release - LIB OpenSSL 구성 선택 => 링커 => 입력 에 libeay32.lib 를 libeay32MT.lib, ssleay32.lib를 ssleay32MT.lib 로 각각 수정한다.
build
- 각 구성 별로 아래와 같이 파일이 출력된다.
- LIB Debug - LIB OpenSSL : root/curl-7.61.1/build/Win32/VC15/LIB Debug - LIB OpenSSL/libcurld.lib
- LIB Release - LIB OpenSSL : root/curl-7.61.1/build/Win32/VC15/LIB Release - LIB OpenSSL/libcurl.lib
프로젝트에 적용 (참고 curl_test_static 프로젝트)
- libcurl static library 를 사용하기 위해서는 전처리기에 'CURL_STATICLIB'를 정의해줘야한다.
- debug : libcurld.lib, libeay32MTd.lib, ssleay32MTd.lib 사용
- release : libcurl.lib, libeay32MT.lib, ssleay32MT.lib 사용
Leave curl 7.61.1 vs2017 static library build(MT/MTD) ( with LIB OpenSSL ) to:
Read more #curl posts
Best Posts From thickeyes
We have not curated any of thickeyes'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.