bazel-jni-example's People
bazel-jni-example's Issues
Fixing this for Windows
Right now this example doesn't work on Windows because it fails to find jni_md.h even though it seems to exist.
$ bazel query "deps(//Network/Client:networking_client)" | grep "jni"
Loading: 0 packages loaded
DEBUG: Rule 'upb' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1558031931 -0700"
DEBUG: Repository upb instantiated at:
C:/users/katso/documents/github/keirospublic/WORKSPACE:101:15: in <toplevel>
Repository rule git_repository defined at:
C:/msys64/home/katso/_bazel_katso/nz6iu7vj/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
//Tools/JNI:copy_jni_hdr_lib
//Tools/JNI:copy_link_jni_header
//Tools/JNI:copy_link_jni_md_header
@bazel_tools//tools/jdk:gen_include/jni.h
@bazel_tools//tools/jdk:gen_include/linux/jni_md.h
@bazel_tools//tools/jdk:include/jni.h
@bazel_tools//tools/jdk:include/linux/jni_md.h
@bazel_tools//tools/jdk:jni_header
@bazel_tools//tools/jdk:jni_md_header-linux
Loading: 2 packages loaded
Loading: 2 packages loaded
# Execution platform: @local_config_platform//:host
ERROR: C:/msys64/home/katso/_bazel_katso/nz6iu7vj/external/bazel_tools/tools/jdk/BUILD:64:19: Executing genrule @bazel_tools//tools/jdk:gen_include/linux/jni_md.h failed: (Exit 1): bash.exe failed: error executing command C:\msys64\usr\bin\bash.exe -c ... (remaining 1 argument skipped)
cp: cannot stat 'external/local_jdk/include/linux/jni_md.h': No such file or directory
I am going to try and fix it but lmk if you can offer any assistance.
Example doesn't work in folders other than root
This repo has been very helpful in figuring out JNI. I've had some trouble getting it to work in a subfolder:
# From the root folder of the repo.
mkdir subfolder
cp Main.java Main.cc Main.h BUILD subfolder
bazel build subfolder:Main
ERROR: /home/jschaf/bazels/bazel-jni-example/subfolder/BUILD:1:1: C++ compilation of rule '//subfolder:main-jni-lib' failed (Exit 1)
subfolder/Main.cc:1:17: fatal error: jni.h: No such file or directory
#include <jni.h>
Do you know how to make this work? I suspect it's modifying the includes but I'm not sure what to change.
should JNI header files be generated?
Line 1 in 3f8a937
How was this file generated? I'm not sure if I should write these header files myself or if there is a tool that can generate them.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.