This is the default compiler on Ubuntu 18.04.
The error is as follows:
gcc -g -c -o Relay.o Relay.cpp -I../../../api/cpp -Iprotobufs -I../../../keyvalue_parser -I/usr/local/include -I/usr/local/include -Wall
Relay.cpp: In member function ‘int Relay::run()’:
Relay.cpp:120:9: error: reference to ‘lock’ is ambiguous
lock.Lock();
^~~~
Relay.cpp:28:20: note: candidates are: gravity::Semaphore lock
gravity::Semaphore lock;
^~~~
In file included from /usr/local/include/google/protobuf/stubs/mutex.h:33:0,
from /usr/local/include/google/protobuf/stubs/common.h:52,
from ../../../api/cpp/protobuf/GravityDataProductPB.pb.h:9,
from ../../../api/cpp/GravityDataProduct.h:34,
from ../../../api/cpp/GravitySubscriber.h:29,
from ../../../api/cpp/GravityNode.h:29,
from Relay.cpp:19:
/usr/include/c++/7/mutex:542:5: note: template<class _L1, class _L2, class ... _L3> void std::lock(_L1&, _L2&, _L3& ...)
lock(_L1& __l1, _L2& __l2, _L3&... __l3)
^~~~
Relay.cpp:123:9: error: reference to ‘lock’ is ambiguous
lock.Unlock();
^~~~
Relay.cpp:28:20: note: candidates are: gravity::Semaphore lock
gravity::Semaphore lock;
^~~~
In file included from /usr/local/include/google/protobuf/stubs/mutex.h:33:0,
from /usr/local/include/google/protobuf/stubs/common.h:52,
from ../../../api/cpp/protobuf/GravityDataProductPB.pb.h:9,
from ../../../api/cpp/GravityDataProduct.h:34,
from ../../../api/cpp/GravitySubscriber.h:29,
from ../../../api/cpp/GravityNode.h:29,
from Relay.cpp:19:
/usr/include/c++/7/mutex:542:5: note: template<class _L1, class _L2, class ... _L3> void std::lock(_L1&, _L2&, _L3& ...)
lock(_L1& __l1, _L2& __l2, _L3&... __l3)
^~~~