Hi,
I am currently using RTKLIB in a C++ multithreaded program.
The following code in rtklib.h conflicts with any other code using std::mutex
#define lock(f) pthread_mutex_lock(f)
#define unlock(f) pthread_mutex_unlock(f)
Here is a sample code showing the problem:
#include "rtklib.h"
#include <mutex>
using namespace std;
int main() {
std::mutex m;
m.lock();
m.unlock();
// Some rtklib code...
return (0);
}
Compiling with g++ 4.8.5 causes the following error:
In file included from ../src/mutexLock.cpp:2:0:
/usr/include/c++/4.8.2/mutex:708:44: error: macro "lock" passed 3 arguments, but takes just 1
lock(_L1& __l1, _L2& __l2, _L3&... __l3)
Hi,
I am currently using RTKLIB in a C++ multithreaded program.
The following code in rtklib.h conflicts with any other code using std::mutex
Here is a sample code showing the problem:
Compiling with g++ 4.8.5 causes the following error: