Using ntcore library c++

I am trying to use the ntcore library (github mirror link: in order to communicate with the roborio from the jetson.

However, I’m not exactly sure how to compile and link the library. Could someone walk me through it?

I was able to successfully compile it on a raspberry pi using the default command they give you in the readme. The Jetson is an ARM processor right?

Try running:

./gradlew :arm:build

To link the file you should be able to add to your build command

-I /path/to/lib/folder -l -ntcore

And of course at “ntcore.h” to your file

I’ve done everything that you’ve suggested, jreneew2, except for the “-I /path/to/lib/folder.” I am unsure what “path/to/lib/folder” refers to.

“/usr/bin/ld: cannot find -lntcore collect2: error: ld returned 1 exit status”

Is the linker error that I’m currently getting.

So your include path is where ntcore was compiled. So probably something like /home/ntcore/bin/ntcore/lib.a

Got it working. Thanks for the help.

No problem.

depends on ow you want to build it.

clone it, git clone

git clone

cd and make a build folder, cd into that

cd ntcore && mkdir build && cd build

make sure if you have cmake installed. if not then id suggest installing build-essential through apt-get.


cmake ..


sudo make install

sorry about that. seems that the dispay mode was in threaded by default. kind of stupid… but yea. didnt see it was already answered.

Also you need to define JAVA_HOME for the cmake to work.

For example:
export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt


What if java is not installed on the Jetson? Would we have to install java just to get ntcore (and cscore) libraries on the Jetson to run C++?

Just install java with apt

Sent from my iPhone using Tapatalk