From: andy Tatarinov <elephantum@dezcom.mephi.ru> To: sisyphus@altlinux.ru Subject: [sisyphus] boost-threads Date: 08 Oct 2002 17:06:58 +0400 Message-ID: <1034082418.16182.18.camel@zoo.dezcom.mephi.ru> (raw) Ктонибудь пробовал мспользовать boost-threads? просто при попытке собрать пример с boost.org (http://boost.org/thread/doc/thread.html) $ cat test.cc #include <boost/thread/thread.hpp> #include <iostream> struct thread_alarm { thread_alarm(int secs) : m_secs(secs) { } void operator()() { boost::xtime XT; boost::xtime_get(&XT, boost::TIME_UTC); xt.sec += m_secs; boost::thread::sleep(XT); std::cout << "alarm sounded..." << std::endl; } int m_secs; }; int main(int argc, char* argv[]) { int secs = 5; std::cout << "setting alarm for 5 seconds..." << std::endl; thread_alarm alarm(secs); boost::thread thrd(alarm); thrd.join(); } $ make cd /home/el/proj/bthreads/ make -k g++ `boost-thread-config --cflags` -c test.cpp In file included from /usr/include/boost/config.hpp:35, from /usr/include/boost/thread/thread.hpp:15, from test.cpp:1: /usr/include/boost/config/compiler/gcc.hpp:57:7: warning: #warning "Unknown compiler version - please run the configure tests and report the results" test.cpp: In member function `void thread_alarm::operator()()': test.cpp:9: aggregate `boost::xtime XT' has incomplete type and cannot be defined test.cpp:10: `TIME_UTC' undeclared in namespace `boost' test.cpp:10: `xtime_get' undeclared in namespace `boost' test.cpp:11: `xt' undeclared (first use this function) test.cpp:11: (Each undeclared identifier is reported only once for each function it appears in.) make: *** [test.o] Error 1 make: Target `test' not remade because of errors. Compilation exited abnormally with code 2 at Tue Oct 8 16:58:45 $ rpm -qa | grep gcc gcc-common-1.1.4-alt1 gcc3.2-3.2.1-alt0.4 gcc3.2-c++-3.2.1-alt0.4 libgcc3.2-3.2.1-alt0.4 libgcc3.2-debug-3.2.1-alt0.4 $ rpm -qa | grep boost boost-devel-1.28.0-alt0.4 boost-thread-1.28.0-alt0.4 boost-thread-devel-1.28.0-alt0.4 при попытке скомпилировать пример с thread_groups ошибок выводится на пару экранов. -- ...2b|!2b?
reply other threads:[~2002-10-08 13:06 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1034082418.16182.18.camel@zoo.dezcom.mephi.ru \ --to=elephantum@dezcom.mephi.ru \ --cc=sisyphus@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \ sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru public-inbox-index sisyphus Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sisyphus AGPL code for this site: git clone https://public-inbox.org/public-inbox.git