Go to Post There is no exit strategy in FIRST - RoboMom [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-01-2017, 16:40
truell20 truell20 is offline
Registered User
FRC #5806
 
Join Date: Jan 2017
Location: New York
Posts: 11
truell20 is on a distinguished road
Using ntcore library c++

I am trying to use the ntcore library (github mirror link: https://github.com/wpilibsuite/ntcore) 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?
Reply With Quote
  #2   Spotlight this post!  
Unread 27-01-2017, 16:46
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 213
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: Using ntcore library c++

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:
Code:
./gradlew :arm:build
To link the file you should be able to add to your build command
Code:
-I /path/to/lib/folder -l -ntcore
And of course at "ntcore.h" to your file
Reply With Quote
  #3   Spotlight this post!  
Unread 27-01-2017, 16:53
truell20 truell20 is offline
Registered User
FRC #5806
 
Join Date: Jan 2017
Location: New York
Posts: 11
truell20 is on a distinguished road
Re: Using ntcore library c++

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.
Reply With Quote
  #4   Spotlight this post!  
Unread 27-01-2017, 16:55
truell20 truell20 is offline
Registered User
FRC #5806
 
Join Date: Jan 2017
Location: New York
Posts: 11
truell20 is on a distinguished road
Re: Using ntcore library c++

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

Is the linker error that I'm currently getting.
Reply With Quote
  #5   Spotlight this post!  
Unread 27-01-2017, 17:37
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 213
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: Using ntcore library c++

So your include path is where ntcore was compiled. So probably something like /home/ntcore/bin/ntcore/lib.a
Reply With Quote
  #6   Spotlight this post!  
Unread 27-01-2017, 21:33
truell20 truell20 is offline
Registered User
FRC #5806
 
Join Date: Jan 2017
Location: New York
Posts: 11
truell20 is on a distinguished road
Re: Using ntcore library c++

Got it working. Thanks for the help.
Reply With Quote
  #7   Spotlight this post!  
Unread 27-01-2017, 21:34
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 213
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: Using ntcore library c++

No problem.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:58.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi