Open joalen opened 9 months ago
Let me check in with The group
On Sun, Jan 14, 2024, 12:29 AM Alen Jo @.***> wrote:
Seems there is an issue with running the examples after I used CMake to build the projects:
C:\Users\joale\Desktop\VectorNav SDK\vnsdk-0.2.1\vnsdk-0.2.1\cpp\examples\RegisterScan\build>C:\MinGW\bin\g++.exe -DVNSENSOR_VERSION=1.0 @CMakeFiles/registerScan.dir/includes_CXX.rsp -g -std=gnu++17 -o CMakeFiles\registerScan.dir\main.cpp.obj -c "C:\Users\joale\Desktop\VectorNav SDK\vnsdk-0.2.1\vnsdk-0.2.1\cpp\examples\RegisterScan\main.cpp" In file included from c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\mutex.hpp:35, from c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\interface\command.hpp:31, from c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\serial_base.hpp:31, from c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\interface\sensor.hpp:33, from C:\Users\joale\Desktop\VectorNav SDK\vnsdk-0.2.1\vnsdk-0.2.1\cpp\examples\RegisterScan\main.cpp:25: c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\mutex_pc.hpp:40:10: error: 'mutex' in namespace 'std' does not name a type 40 | std::mutex _mutex; | ^~~~~ c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\mutex_pc.hpp:30:1: note: 'std::mutex' is defined in header '
'; did you forget to '#include '? 29 | #include "HAL/Mutex_Base.hpp" +++ |+#include 30 | c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\mutex_pc.hpp: In member function 'virtual void VN::Mutex::lock()': c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\mutex_pc.hpp:36:34: error: '_mutex' was not declared in this scope; did you mean 'Mutex'? 36 | void lock() override final { _mutex.lock(); } | ^ ~| Mutex c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\mutex_pc.hpp: In member function 'virtual void VN::Mutex::unlock()': c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\mutex_pc.hpp:37:36: error: '_mutex' was not declared in this scope; did you mean 'Mutex'? 37 | void unlock() override final { _mutex.unlock(); } | ^~| Mutex In file included from c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread.hpp:29, from c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\interface\sensor.hpp:36, from C:\Users\joale\Desktop\VectorNav SDK\vnsdk-0.2.1\vnsdk-0.2.1\cpp\examples\RegisterScan\main.cpp:25: c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread_pc.hpp: At global scope: c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread_pc.hpp:74:10: error: 'thread' in namespace 'std' does not name a type 74 | std::thread _thread; | ^~In file included from c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread.hpp:29, from c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\interface\sensor.hpp:36, from C:\Users\joale\Desktop\VectorNav SDK\vnsdk-0.2.1\vnsdk-0.2.1\cpp\examples\RegisterScan\main.cpp:25: c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread_pc.hpp:31:1: note: 'std::thread' is defined in header ''; did you forget to '#include '? 30 | #include "HAL/Thread_Base.hpp" +++ |+#include 31 | // #include // Necessary for priority c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread_pc.hpp: In constructor 'VN::Thread::Thread(Callable&&, Args&& ...)': c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread_pc.hpp:41:53: error: class 'VN::Thread' does not have any field named '_thread' 41 | explicit Thread(Callable&& f, Args&&... args) : _thread(std::forward (f), std::forward (args)...){}; | ^ ~~ c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread_pc.hpp: In destructor 'VN::Thread::~Thread()': c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread_pc.hpp:44:13: error: '_thread' was not declared in this scope; did you mean '_hread'? 44 | if (_thread.joinable()) { _thread.join(); } | ^~~ | _hread c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread_pc.hpp: In member function 'virtual void VN::Thread::join()': c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread_pc.hpp:47:34: error: '_thread' was not declared in this scope; did you mean '_hread'? 47 | void join() override final { _thread.join(); } | ^~~ | _hread c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread_pc.hpp: In member function 'virtual void VN::Thread::detach()': vnsdk-~1.1\cpp\include\hal\thread.hpp:29, from c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\interface\sensor.hpp:36, from C:\Users\joale\Desktop\VectorNav SDK\vnsdk-0.2.1\vnsdk-0.2.1\cpp\examples\RegisterScan\main.cpp:25: c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread_pc.hpp: In function 'void VN::thisThread::sleepFor(VN::Microseconds)': c:\users\joale\desktop\vector~1\vnsdk-~1.1\vnsdk-~1.1\cpp\include\hal\thread_pc.hpp:78:72: error: 'std::this_thread' has not been declared 78 | inline void sleepFor(const Microseconds sleepDuration) noexcept { std::this_thread::sleep_for(sleepDuration); }— Reply to this email directly, view it on GitHub https://github.com/son4john/VectorNav-SDK-Testing/issues/14, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL2AEX467FPJE6RBWHO76JTYON3MXAVCNFSM6AAAAABBZ34AA6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGA4DANRQGI4TEOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Okay, so it turns out I got it to work with Visual Studio Community, but running the program tells me that the .dll does not have an executable, as shown here:
Seems there is an issue with running the examples after I used CMake to build the projects: