FFTW は, 離散フーリエ変換 (DFT) を行う C のプログラム集.1次元に限らず,より高次元でも動く.
このページでは,Windows での FFTW バージョン 3 (FFTW3) のインストール法を説明する.
※ Linux での FFTW3 のビルドとインストールについては, 別のWebページで説明する.
Windows での Visual Studio Community 2022 のインストール: 別ページ »で説明
Visual Studio Community 2022 に, Build Tools for Visual Studio 2022の機能が含まれている.
Windows での Build Tools for Visual Studio 2022 (ビルドツール for Visual Studio 2022) のインストール: 別ページ »で説明
【関連する外部ページ】
【サイト内の関連ページ】
Windows での Git のインストール: 別ページ »で説明
【関連する外部ページ】
Git の公式ページ: https://git-scm.com/
【サイト内の関連ページ】
Windows での cmake のインストール: 別ページ »で説明
【関連する外部ページ】
cmake の公式ダウンロードページ: https://cmake.org/download/
7-Zip 22.01 のインストール
Windows では, コマンドプロンプトを管理者として開き, 次のコマンドを実行することにより, 7-Zip 22.01 のインストールを行うことができる.
mkdir %HOMEPATH%\7zip cd %HOMEPATH%\7zip curl -O https://www.7-zip.org/a/7z2201-x64.exe .\7z2201-x64.exe call powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";c:\Program Files\7-Zip\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")"
【サイト内の関連ページ】
Windows での 7-Zip のインストール: 別ページ »で説明
【関連する外部ページ】
7-Zip の公式ページ: https://sevenzip.osdn.jp/
コマンドプロンプトを管理者として実行: 別ページ »で説明
このとき,使用するバージョンを指定している.
C: cd %HOMEPATH% rmdir /s /q fftw-3.3.10 del fftw-3.3.10.tar.gz del fftw-3.3.10.tar curl -O https://www.fftw.org/fftw-3.3.10.tar.gz "c:\Program Files\7-Zip\7z.exe" x fftw-3.3.10.tar.gz "c:\Program Files\7-Zip\7z.exe" x fftw-3.3.10.tar
cmake でのオプションについて
cmake のオプションの 「Visual Studio 17 2022」のところは, 使用する Visual Studio のバージョンにあわせること. Visual Studio 2022 のときは,「Visual Studio 17 2022」. Visual Studio 2019 のときは,「Visual Studio 16 2019」
cmake の実行手順例は次の通り
cd %HOMEPATH% cd fftw-3.3.10 rmdir /s /q build mkdir build cd build del CMakeCache.txt cmake .. -G "Visual Studio 17 2022" -A x64 -T host=x64 ^ -DCMAKE_INSTALL_PREFIX="c:\fftw3"
※ 下の通りになるとは限らない.エラーメッセージが出るなど場合は,前で cmake を実行したときの設定を変えてやり直す.
cmake --build . --config RELEASE cmake --build . --config RELEASE --target INSTALL
コマンドプロンプトを管理者として実行: 別ページ »で説明
call powershell -command "[System.Environment]::SetEnvironmentVariable(\"FFTW3_ROOT\", \"C:\fftw3\", \"Machine\")"
コマンドプロンプトを管理者として実行: 別ページ »で説明
call powershell -command "$oldpath = [System.Environment]::GetEnvironmentVariable(\"Path\", \"Machine\"); $oldpath += \";C:\fftw3\bin\"; [System.Environment]::SetEnvironmentVariable(\"Path\", $oldpath, \"Machine\")"