美文网首页
JAVACPP编译环境

JAVACPP编译环境

作者: 何亮hook_8285 | 来源:发表于2023-12-30 21:52 被阅读0次

Msys2安装

下载Msys2

https://www.msys2.org/

修改国内清华镜像

https://mirrors.tuna.tsinghua.edu.cn/help/msys2/

Msys2配置环境

Window-》系统属性-》高级-》环境变量-》Path-》添加以下内容

c:\msys64\mingw64\bin   
c:\msys64\usr\bin

安装MSYS2依赖库

#安装依赖库
pacman -S base-devel tar patch autoconf autoconf-archive automake make git unzip zip p7zip pkg-config gnupg mingw-w64-x86_64-nasm mingw-w64-x86_64-toolchain mingw-w64-x86_64-libtool mingw-w64-x86_64-gcc mingw-w64-i686-gcc mingw-w64-x86_64-gcc-fortran mingw-w64-i686-gcc-fortran mingw-w64-x86_64-libwinpthread-git mingw-w64-i686-libwinpthread-git mingw-w64-x86_64-SDL mingw-w64-i686-SDL mingw-w64-x86_64-ragel
#安装依赖库
pacman -S nasm yasm diffutils cmake
#pacman包管理网站https://packages.msys2.org/package/mingw-w64-x86_64-libwinpthread-git?repo=mingw64

MSYS2开启MSVC环境支持

将msys2_shell.cmd 文件中的rem set MSYS2_PATH_TYPE=inherit 设置为set MSYS2_PATH_TYPE=inherit

将mingw32.ini文件中#MSYS2_PATH_TYPE=inherit设置为MSYS2_PATH_TYPE=inherit

将mingw64.ini文件中#MSYS2_PATH_TYPE=inherit设置为MSYS2_PATH_TYPE=inherit

安装WindowSDK

https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/

安装MSVC

下载 Visual Studio Tools - 免费安装 Windows、Mac、Linux (microsoft.com)

配置MSVC系统环境

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build

JAVACPP文档

环境
https://github.com/bytedeco/javacpp-presets/wiki/Build-Environments
https://github.com/bytedeco/javacpp-presets/wiki/Building-on-Windows

预设模板
https://github.com/bytedeco/javacpp-presets/wiki/Create-New-Presets
https://github.com/bytedeco/javacpp-presets/tree/helloworld/helloworld
https://github.com/bytedeco/javacpp-presets/tree/zlib/zlib

相关文章

网友评论

      本文标题:JAVACPP编译环境

      本文链接:https://www.haomeiwen.com/subject/cvxendtx.html