
Hi: Ok, I'm trying to use boost::asio::io_service::run as follows. At the top of a .hpp file I have: typedef boost::asio::io_service FolderMonitoringService; I can pass this to a constructor requiring an io_service as follows: boost::asio::dir_monitor dm(FolderMonitoringService); however when I try to do: FolderMonitoringService.run(); I get 2 c2143 errors. 1>d:\work\access for everyone\sibelius access\sibeliusaccessserver\utility.cpp(127): error C2143: syntax error : missing ';' before '.' 1>d:\work\access for everyone\sibelius access\sibeliusaccessserver\utility.cpp(127): error C2143: syntax error : missing ';' before '.' If I remove the typedef previously shown, this line: FolderMonitoringService.run(); Compiles fine, but the line: boost::asio::dir_monitor dm(FolderMonitoringService); will not compile giving c2061, solved with the typedef-thanks igor! I've tried boost.ref, with know success. The function signature of the dir_monitor's constructor is: explicit basic_dir_monitor(boost::asio::io_service &io_service) Dir_Monitor is typedef'd to be basic_dir_monitor. Can anybody please tell me why the run function is causing an issue and how to fix this issue. Regards Sean.