Trying to write a program to run Network Tables using Eclipse C++ Doxygen and compiling with MinGW64 version 4.7.1. I have included wpilib and mingw-std-threads-master. I am receiving the following error associated with the wpilib\cpp\current\include/mutex folder:
error: ‘unique_lock’ does not name a type
error: ‘__try_to_lock’ is not a member of ‘std’
error: ‘unique_lock’ was not declared in this scope
error: expected primary-expression before ‘>’ token
error: ‘__first’ was not declared in this scope
Any suggestions for what I could be missing? Thank you
#include <mutex>
Likely didn’t include the library required for those.
#include <mutex> was included. Here is the program:
#include <iostream>
#include <pthread.h>
#include <thread>
#include <mutex>
#include “mingw.mutex.h”
#include “mingw.thread.h”
#include <ntcore.h>
#include “networktables/NetworkTable.h”
int main() {
NetworkTable::SetClientMode();
NetworkTable::SetIPAddress("172.22.11.2");
NetworkTable::Initialize();
NetworkTable::Shutdown();
std::cout << "!!!Hello World!!!" << std::endl; // prints !!!Hello World!!!
return 0;
}
Any other possible suggestions?