0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

libcurlをWindowsでビルドする

Last updated at Posted at 2023-02-09

curlのWindowsバイナリ版からlibcurlを利用しようと思って、ダウンロードしたのですが、Windowsバイナリ版のcurlは、Mingw-w64でビルドされているようなので使うことを断念。curlのソースコードからビルドして利用することにしました。

必要なアプリケーション

  • curl
  • Visual Studio

アプリケーションのインストール

Visual Studioのインストール

Visual Stuido 2022 Commnunity を以下からダウンロードしてインストールします。

curlのインストール

以下のURLから curl のソースコードを取得します。

curlのビルド

圧縮ファイルの展開

curlの圧縮ファイルを展開します。

> tar xvf curl-7.87.0.tar.gz

展開されて出来た curl-7.87.0\winbuildフォルダにあるREADME.mdにVisual C++でのビルド方法が記載されいます。

Visual Studio用 コマンドプロンプトを 起動

64bit版のlibcurlを作成する場合、x64 Native Tools Command Prompt for VS 2022 を起動します。

カレントディレクトリを curl-7.87.0\winbuild に移動します。

> cd curl-7.87.0\winbuild

以下のコマンドでビルドします。

> nmake /f Makefile.vc mode=dll

エラーが出ていなければ、以下のフォルダに開発に必要となるヘッダファイル、dll, lib が格納されます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?