|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Error while trying to setup NetworkTables on PC
Hello, my team and I are currently trying to implement vision processing on our robot, in order to do so we will have a PC perform all the work and send the data to the roboRio through a NetworkTable, the problem is that i cant seem to build the .cpp file for setting up the PC side of the program. Here are both the program and the output when I attempt to build it.
Program (This is just for testing and learning purposes): #include <ntcore.h> #include <networktables/NetworkTable.h> using std::shared_ptr; int main() { NetworkTable::SetClientMode(); NetworkTable::SetIPAddress("10.46.35.2"); NetworkTable::Initialize(); shared_ptr<NetworkTable> myTable = NetworkTable::GetTable("SmartDashboard"); myTable->PutString("ExampleString", "Sample Text"); NetworkTable::Shutdown(); return 0; } Output: https://drive.google.com/file/d/0By8...NIYnVTeEU/view I see that the problem is related to something caller llvm, but I cant seem to find a way to fix this, please help :c |
|
#2
|
|||
|
|||
|
Re: Error while trying to setup NetworkTables on PC
You'll want to link against libwpiutil.so as well, add
Code:
-lwpiutil |
|
#3
|
|||
|
|||
|
Re: Error while trying to setup NetworkTables on PC
Quote:
|
|
#4
|
|||
|
|||
|
Re: Error while trying to setup NetworkTables on PC
Yes, thanks, I was able to compile and test it
![]() |
|
#5
|
||||
|
||||
|
Re: Error while trying to setup NetworkTables on PC
Hello all, I have been trying to compile ntcore and cscore on a raspberry pi 3 and can not figure out the issue. Whenever I compile with
Code:
g++ -std=c++0x -I/home/pi/ntcore/include -lwpilibutil -lntcore test.cpp -o test `pkg-config --cflags --libs opencv` Code:
fatal error: llvm/ArrayRef.h: No such file or directory Code:
./gradlew :arm:build Any help is appreciated |
|
#6
|
||||
|
||||
|
Re: Error while trying to setup NetworkTables on PC
Quote:
One thing to note is that roborio builds built with ./gradlew :arm:ntcore:build will NOT work with a raspberry pi. They are completely separate architectures. We provide some (untested) artifacts for pi and other hf devices on our maven repo. Our recommendation for Pi is to download the 3 artifacts (cscore, wpiutil and ntcore) from our maven repo, and build locally on the Pi using those artifacts. You can find more information here regarding which artifacts to use and how to find the right ones for your specific device. If you do want to build your own builds, download the repositories and run "./gradlew :arm:ntcore:build -PcompilerPrefix=" on the pi itself with nothing specified after the compiler prefix. That will trick the build system into building the arm artifacts with the built in compiler. |
|
#7
|
||||
|
||||
|
Re: Error while trying to setup NetworkTables on PC
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|