Re: [Cppcms-users] Failure to compile hello world
Brought to you by:
artyom-beilis
From: Marcel H. <ke...@co...> - 2016-01-10 01:18:15
|
I don't know why, but worker_thread is just wrong. You can use the examples in the svn folder itself, the hello_world program there just runs fine (where it uses the right one, cppcms::service, instead of worker_thread) Greetings, On 10.01.2016 01:32, John Soares wrote: > Hi, > > I'm trying to run the code > in: http://cppcms.com/wikipp/en/page/tut_hello_world_code > > but this is what I've got: > ---------------------------------------------------------------------------------------------- > hello.cpp:11:34: error: expected ‘)’ before ‘&’ token > my_hello_world(worker_thread &worker) : > ^ > hello.cpp: In function ‘int main(int, char**)’: > hello.cpp:30:9: error: ‘manager’ was not declared in this scope > manager app(argc,argv); > ^ > hello.cpp:30:9: note: suggested alternative: > In file included from hello.cpp:3:0: > /usr/local/include/cppcms/service.h:48:9: note: ‘cppcms::views::manager’ > class manager; > ^ > hello.cpp:30:17: error: expected ‘;’ before ‘app’ > manager app(argc,argv); > ^ > hello.cpp:31:9: error: ‘app’ was not declared in this scope > app.set_worker(new application_factory<my_hello_world>()); > ^ > hello.cpp:31:28: error: expected type-specifier before > ‘application_factory’ > app.set_worker(new application_factory<my_hello_world>()); > ---------------------------------------------------------------------------------------------- > > This is linux mint(Ubuntu like). > > echo $LD_LIBRARY_PATH = > /usr/local/lib/ > > ls /usr/local/lib/ = > libbooster.a libbooster.so.0 libcppcms.a libcppcms.so.1 > python2.7 > libbooster.so libbooster.so.0.0.3 libcppcms.so libcppcms.so.1.0.5 > python3.4 > > ls /usr/local/include/cppcms/ = > application.h config.h forwarder.h > localization.h session_dual.h url_dispatcher.h > applications_pool.h copy_filter.h http_content_type.h mem_bind.h > session_interface.h url_mapper.h > archive_traits.h cppcms_error.h http_context.h > mount_point.h session_pool.h util.h > base64.h crypto.h http_cookie.h rpc_json.h > session_sid.h view.h > base_cache_fwd.h cstdint.h http_file.h > serialization_classes.h session_storage.h views_pool.h > base_content.h defs.h http_request.h > serialization.h steal_buf.h xss.h > base_view.h encoding.h http_response.h service.h > string_key.h > cache_interface.h filters.h json.h > session_api.h thread_pool.h > cache_pool.h form.h locale_fwd.h > session_cookies.h urandom.h > > > I spent 4 hours trying to solve this but tried everything that I could > imagine without any success > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users |