CURL + OpenSSL V3.0 빌드하기
OpenSSL V3.0 빌드
- 환경
- Windows
- Visual Studio 2019
- OpenSSL V3.0.10
- NASM 설치
- https://www.nasm.us/
- Stable 버전 설치
- Perl 설치
- https://strawberryperl.com/
- Windows 환경에 맞는 Installer 다운로드 후 설치
- OpenSSL
- 빌드
- cmd 실행
- OpenSSL 경로로 이동 (cd [경로])
- 아래 명령어 수행 (빌드환경에 따라 경로 변경 주의!)
- 아래 명령어는 빌드 구성이 x86 dll debug, x86 lib debug, x86 dll release, x86 lib release 빌드를 안내하고 있으며, 필요한 구성만 빌드할 것
:: 변수 설정 (OpenSSL 설치 경로에 따라 변경해줘야 함)
set OpenSSLRootPath=%cd%
set Debug_Dll_x86=%RootPath%\output\openssl\debug_dll_x86
set Debug_Lib_x86=%RootPath%\output\openssldebug_lib_x86
set Release_Dll_x86=%RootPath%\output\openssl\release_dll_x86
set Release_Lib_x86=%RootPath%\output\openssl\release_lib_x86
:: 환경변수 설정 (NASM, Perl 설치 경로에 따라 변경해줘야 함)
set path=%path%;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Users\admin\AppData\Local\bin\NASM;
:: 출력 디렉토리 정리
rmdir /s /q %OpenSSLRootPath%\output\openssl\
mkdir %Debug_Dll_x86%
mkdir %Release_Dll_x86%
:: Openssl Build
cd %OpenSSLRootPath%
:: x86 (Visual Studio 설치 경로에 따라 변경해줘야 함)
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars32.bat"
:: x86 dll debug
nmake clean
perl Configure VC-WIN32 --prefix=%Debug_Dll_x86% --openssldir= --debug
nmake
nmake install_sw
:: x86 lib debug
nmake clean
perl Configure VC-WIN32 --prefix=%Debug_Lib_x86% --openssldir= --debug no-shared
nmake
nmake install_sw
:: x86 dll release
nmake clean
perl Configure VC-WIN32 --prefix=%Release_Dll_x86% --openssldir=
nmake
nmake install_sw
:: x86 lib release
nmake clean
perl Configure VC-WIN32 --prefix=%Release_Lib_x86% --openssldir= no-shared
nmake
nmake install_sw
-
- perl 옵션
- 32bit : Configure VC-WIN32
- 64bit : Configure VC-WIN64A
- static library : no-shared (없을 경우 dynamic library)
- perl 옵션
CURL 빌드
- 환경
- Windows
- Visual Studio 2019
- CURL
- 빌드
- CURL 소스 경로에 curl\projects\Windows\VC14.30\curl-all.sln 실행
- 프로젝트 구성 중 LIB Release - DLL OpenSSL 선택 (필요한 구성을 선택하면 됨)
- [메뉴] > [프로젝트] > [속성] 에서 아래 내용 수정
- [구성 속성] > [C/C++] > [일반] > "Additional Include Directories" 에 OpenSSL "Include" 폴더 경로 추가
'개발 > Windows' 카테고리의 다른 글
UNICODE_STRING 문자열 함수(WDK, Kernel-Mode String) (0) | 2023.10.03 |
---|