hkr / fuji-cam-wifi-tool

Trying to reverse-engineer the wifi remote control protocol used by Fuji X series cameras
The Unlicense
234 stars 37 forks source link

build error on Linux #16

Closed hvfrancesco closed 3 years ago

hvfrancesco commented 4 years ago

building on Ubuntu 18.04 I get following error:

Scanning dependencies of target fuji_cam_wifi_tool [ 92%] Building CXX object tool/CMakeFiles/fuji_cam_wifi_tool.dir/src/main.cpp.o /mnt/sviluppo/fuji-tool/fuji-cam-wifi-tool/tool/src/main.cpp:38:6: error: ‘timed_mutex’ in namespace ‘std’ does not name a type std::timed_mutex g_comm_lock; ^~~ /mnt/sviluppo/fuji-tool/fuji-cam-wifi-tool/tool/src/main.cpp: In function ‘void fcwt::onMouse(int, int, int, int, void)’: /mnt/sviluppo/fuji-tool/fuji-cam-wifi-tool/tool/src/main.cpp:80:21: error: ‘getWindowImageRect’ was not declared in this scope Rect win_size = getWindowImageRect(WIN_NAME); ^~~~~~ /mnt/sviluppo/fuji-tool/fuji-cam-wifi-tool/tool/src/main.cpp:85:8: error: ‘g_comm_lock’ was not declared in this scope if(g_comm_lock.try_lock_for(std::chrono::milliseconds(10))) { ^~~ /mnt/sviluppo/fuji-tool/fuji-cam-wifi-tool/tool/src/main.cpp: In function ‘void fcwt::draw_focus_point(cv::Mat&, fcwt::auto_focus_point, cv::Scalar)’: /mnt/sviluppo/fuji-tool/fuji-cam-wifi-tool/tool/src/main.cpp:128:25: error: ‘getWindowImageRect’ was not declared in this scope Rect win_size = getWindowImageRect(WIN_NAME); ^~~~~~ /mnt/sviluppo/fuji-tool/fuji-cam-wifi-tool/tool/src/main.cpp: In function ‘int fcwt::main(int, const char)’: /mnt/sviluppo/fuji-tool/fuji-cam-wifi-tool/tool/src/main.cpp:347:16: error: ‘lock_guard’ in namespace ‘std’ does not name a template type const std::lock_guard lock(g_comm_lock); ^~~~~~ tool/CMakeFiles/fuji_cam_wifi_tool.dir/build.make:62: recipe for target 'tool/CMakeFiles/fuji_cam_wifi_tool.dir/src/main.cpp.o' failed make[2]: [tool/CMakeFiles/fuji_cam_wifi_tool.dir/src/main.cpp.o] Error 1 CMakeFiles/Makefile2:148: recipe for target 'tool/CMakeFiles/fuji_cam_wifi_tool.dir/all' failed make[1]: [tool/CMakeFiles/fuji_cam_wifi_tool.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: [all] Error 2

etkayapar commented 4 years ago

Scanning dependencies of target fuji_cam_wifi_tool [ 92%] Building CXX object tool/CMakeFiles/fuji_cam_wifi_tool.dir/src/main.cpp.o /mnt/sviluppo/fuji-tool/fuji-cam-wifi-tool/tool/src/main.cpp:38:6: error: ‘timed_mutex’ in namespace ‘std’ does not name a type std::timed_mutex g_comm_lock;

I was also getting this error under Ubuntu 18.04 using @mzealey s fork. but that was the only error for me. I solved that by adding

#include <mutex>

to the begginning of /tool/src/main.cpp (around the other includes like #include <algorithm>

Hope that helps you too!

hvfrancesco commented 4 years ago

It compiles with your suggested fix, thanks

hkr commented 3 years ago

Should be fixed in c597fc4, but I have not tested it on Linux.