由于缺少 JavaVM 框架,在 Xcode 12.2 更新后,JavaCPP 在 macOS 上构建失败 [英] JavaCPP builds failing on macOS after Xcode 12.2 update due to missing JavaVM framework

查看:41
本文介绍了由于缺少 JavaVM 框架,在 Xcode 12.2 更新后,JavaCPP 在 macOS 上构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近从 12.1 更新到 Xcode 12.2 版.我的 javacpp 项目的 maven 构建在 clang++ 步骤中开始失败,出现以下命令和错误:

I recently updated to Xcode version 12.2 from 12.1. My maven build of a javacpp project began failing at that point on the clang++ step the following command and error:

clang++ -I/Users/<username>/git/<product>-javacpp/src/main/cpp -I/usr/local/include -I/Library/Java/JavaVirtualMachines/jdk-14.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk-14.0.2.jdk/Contents/Home/include/darwin /Users/<username>/git/<product>-javacpp/target/classes/com/<product>/javacpp/video/ffmpeg/jniAvFormatCallbackFactory.cpp /Users/<username>/git/<product>-javacpp/src/main/java/jnijavacpp.cpp -march=x86-64 -m64 -O3 -Wl,-rpath,@loader_path/. -Wall -fPIC -dynamiclib -undefined dynamic_lookup -o libjniAvFormatCallbackFactory.dylib -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lavformat -lavutil -framework JavaVM

ld: framework not found JavaVM

我正在使用 macOS 10.15.7 和 JavaCPP 1.4.4 进行构建

I am building with macOS 10.15.7 and JavaCPP 1.4.4

通过重新安装每个 Xcode 版本,我确认此框架存在于 Xcode 12.1 中,并且已从 Xcode 12.2 中删除.我现在可以使用 12.1 进行构建,但需要了解未来接受 Xcode 升级的路径.

By reinstalling each Xcode version, I confirmed that this framework is present in Xcode 12.1 and has been removed from Xcode 12.2. I can build now with 12.1, but need to understand a path forward to accept Xcode upgrades in the future.

推荐答案

您可以安全地将 -framework JavaVM 替换为 -framework JavaNativeFoundation.它对我有用.

You can safely replace -framework JavaVMwith -framework JavaNativeFoundation. It worked for me.

S.

这篇关于由于缺少 JavaVM 框架,在 Xcode 12.2 更新后,JavaCPP 在 macOS 上构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆