admin管理员组文章数量:1122846
I am trying to set up access to use WebRTC lib binding or to use JExtract, but whenever I run the tool on the webrtc/src/api/ files folder, I get an error. Yes, I have done all the points to cle.exe file globally, and other tools are there globally.
PowerShell 7.4.6
PS C:\Users\Kinsl> jextract `
-I "C:\Users\Kinsl\webrtc\src\api" -I "C:\Users\Kinsl\webrtc\src"
-I "C:\Users\Kinsl\webrtc\src\third_party" -I "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\include"
-t africa.jopen.webrtc --output "C:\Users\Kinsl\IdeaProjects\webrtc-for-java-apps\src\main\java"
-l webrtc `
"C:\Users\Kinsl\webrtc\src\api\peer_connection_interface.h"
ERROR: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\include\yvals_core.h:28:2: error: Error in C++ Standard Library usage"
Please can you help
Also here is the version info
PS C:\Users\Kinsl> jextract --version
jextract 22
JDK version 22+35-2369
LibClang version clang version 13.0.0
I am trying to set up access to use WebRTC lib binding or to use JExtract, but whenever I run the tool on the webrtc/src/api/ files folder, I get an error. Yes, I have done all the points to cle.exe file globally, and other tools are there globally.
PowerShell 7.4.6
PS C:\Users\Kinsl> jextract `
-I "C:\Users\Kinsl\webrtc\src\api" -I "C:\Users\Kinsl\webrtc\src"
-I "C:\Users\Kinsl\webrtc\src\third_party" -I "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\include"
-t africa.jopen.webrtc --output "C:\Users\Kinsl\IdeaProjects\webrtc-for-java-apps\src\main\java"
-l webrtc `
"C:\Users\Kinsl\webrtc\src\api\peer_connection_interface.h"
ERROR: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.39.33519\include\yvals_core.h:28:2: error: Error in C++ Standard Library usage"
Please can you help
Also here is the version info
PS C:\Users\Kinsl> jextract --version
jextract 22
JDK version 22+35-2369
LibClang version clang version 13.0.0
Share
Improve this question
asked yesterday
kinsley kajivakinsley kajiva
1,8601 gold badge22 silver badges26 bronze badges
0
1 Answer
Reset to default 3I assume you use the header file from https://webrtc.googlesource.com/src/+/refs/heads/main/api/peer_connection_interface.h. If that is the case, that peer_connection_interface.h
file includes vector.h
(https://webrtc.googlesource.com/src/+/refs/heads/main/api/peer_connection_interface.h#78), and probably your local vector.h
is similar to https://github.com/microsoft/STL/blob/main/stl/inc/vector#L8 and needs yvals_core.h
, an internal header file in Microsoft's Standard Library implementation for C++.
Below is where the error message is coming from.
// This does not use `_EMIT_STL_ERROR`, as it needs to be checked before we include anything else.
// However, `_EMIT_STL_ERROR` has a dependency on `_CRT_STRINGIZE`, defined in `<vcruntime.h>`.
// Here, we employ the same technique as `_CRT_STRINGIZE` in order to avoid needing to update the line number.
#ifndef __cplusplus
#define _STL_STRINGIZE_(S) #S
#define _STL_STRINGIZE(S) _STL_STRINGIZE_(S)
#pragma message(__FILE__ "(" _STL_STRINGIZE(__LINE__) "): STL1003: Unexpected compiler, expected C++ compiler.")
#error Error in C++ Standard Library usage
#endif // !defined(__cplusplus)
jextract
uses clang C API to parse the header file and when you try to run jextract
over the peer_connection_interface.h
, the indirect reference to yvals_core.h
signals that processing does not occur according to C++ standards. Moreover, https://webrtc.googlesource.com/src/+/refs/heads/main/api/peer_connection_interface.h is a C++ header file that does not have a C interface that jextract
can further process (please look at https://github.com/openjdk/jextract/blob/master/doc/GUIDE.md#other-languages).
If you would like to generate Java bindings for the webrtc
lib, my colleague Jorn Vernee found another standalone implementation of some of the WebRTC features that has a C interface: https://github.com/paullouisageneau/libdatachannel. He gave it a try on a Windows machine and works with jextract
.
本文标签: bindingJava jextract for webrtc header filesStack Overflow
版权声明:本文标题:binding - Java jextract for webrtc header files - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736282623a1926701.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论