qicosmos / rest_rpc

modern C++(C++11), simple, easy to use rpc framework
MIT License
1.66k stars 365 forks source link

大哥救急 cmake找不到jni #54

Open naruto-f opened 2 years ago

naruto-f commented 2 years ago

错误提示如下: CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message): Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)

但是我java确实是安装了 带上路径也不行

qicosmos commented 2 years ago

我在cmake里面加了一个是否启用java的开关,默认不启用,更新一下代码试试。

naruto-f commented 2 years ago

谢谢大哥,这个没问题了 但是报这个错 expected primary-expression before 鈥�>鈥� token   263 |     auto t = future_result.get().as<T>();是什么问题?

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年12月6日(星期一) 中午12:03 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [qicosmos/rest_rpc] 大哥救急 cmake找不到jni (Issue #54)

我在cmake里面加了一个是否启用java的开关,默认不启用,更新一下代码试试。

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

qicosmos commented 2 years ago

这是编译错误还是运行example报的错误?

qicosmos commented 2 years ago

另外,编译环境是什么样的?gcc是什么版本?

naruto-f commented 2 years ago

编译错误  环境是clion连的wsl ubuntu20.4

---原始邮件--- 发件人: @.> 发送时间: 2021年12月6日(周一) 下午5:30 收件人: @.>; 抄送: @.**@.>; 主题: Re: [qicosmos/rest_rpc] 大哥救急 cmake找不到jni (Issue #54)

这是编译错误还是运行example报的错误?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

naruto-f commented 2 years ago

gcc

---原始邮件--- 发件人: @.> 发送时间: 2021年12月6日(周一) 下午5:30 收件人: @.>; 抄送: @.**@.>; 主题: Re: [qicosmos/rest_rpc] 大哥救急 cmake找不到jni (Issue #54)

另外,编译环境是什么样的?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

naruto-f commented 2 years ago

难道是我用法有问题吗 我是直接跟我自己的代码放一起跑,需不需要先编译成库?如果是那该怎么做,我对编译这一方面不太熟。

------------------ 原始邮件 ------------------ 发件人: "qicosmos/rest_rpc" @.>; 发送时间: 2021年12月6日(星期一) 下午5:30 @.>; @.**@.>; 主题: Re: [qicosmos/rest_rpc] 大哥救急 cmake找不到jni (Issue #54)

另外,编译环境是什么样的?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

naruto-f commented 2 years ago

另外,编译环境是什么样的?gcc是什么版本?

老哥 这到底是哪地方出问题了啊?

naruto-f commented 2 years ago

gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)

qicosmos commented 2 years ago

加一下rest_rpc qq群340713904

naruto-f commented 2 years ago

大哥 你到是同意我进群啊

naruto-f commented 2 years ago

加一下rest_rpc qq群340713904

老哥 这个错误到底是啥原因啊

naruto-f commented 2 years ago

老哥 我把程序压缩包(在附件)发给你了 你空闲的时候在你的环境下编译一下,看看到底是我的环境有问题还是我的用法有问题,万分感谢!

------------------ 原始邮件 ------------------ 发件人: "qicosmos/rest_rpc" @.>; 发送时间: 2021年12月7日(星期二) 上午9:22 @.>; @.**@.>; 主题: Re: [qicosmos/rest_rpc] 大哥救急 cmake找不到jni (Issue #54)

加一下rest_rpc qq群340713904

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.