From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: andy Tatarinov To: sisyphus@altlinux.ru Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Mailer: Ximian Evolution 1.0.8- Date: 08 Oct 2002 17:06:58 +0400 Message-Id: <1034082418.16182.18.camel@zoo.dezcom.mephi.ru> Mime-Version: 1.0 X-MailScanner: Found to be clean Subject: [sisyphus] boost-threads Sender: sisyphus-admin@altlinux.ru Errors-To: sisyphus-admin@altlinux.ru X-BeenThere: sisyphus@altlinux.ru X-Mailman-Version: 2.0.9 Precedence: bulk Reply-To: sisyphus@altlinux.ru List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Archived-At: List-Archive: =EB=D4=CF=CE=C9=C2=D5=C4=D8 =D0=D2=CF=C2=CF=D7=C1=CC =CD=D3=D0=CF=CC=D8=DA= =CF=D7=C1=D4=D8 boost-threads? =D0=D2=CF=D3=D4=CF =D0=D2=C9 =D0=CF=D0=D9=D4= =CB=C5 =D3=CF=C2=D2=C1=D4=D8 =D0=D2=C9=CD=C5=D2 =D3 boost.org (http://boost.org/th= read/doc/thread.html) $ cat test.cc #include #include struct thread_alarm { thread_alarm(int secs) : m_secs(secs) { } void operator()() { boost::xtime XT; boost::xtime_get(&XT, boost::TIME_UTC); xt.sec +=3D m_secs; boost::thread::sleep(XT); std::cout << "alarm sounded..." << std::endl; } int m_secs; }; int main(int argc, char* argv[]) { int secs =3D 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=20 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 =D0=D2=C9 =D0=CF=D0=D9=D4=CB=C5 =D3=CB=CF=CD=D0=C9=CC=C9=D2=CF=D7=C1=D4=D8 = =D0=D2=C9=CD=C5=D2 =D3 thread_groups =CF=DB=C9=C2=CF=CB =D7=D9=D7=CF=C4=C9= =D4=D3=D1 =CE=C1 =D0=C1=D2=D5 =DC=CB=D2=C1=CE=CF=D7. --=20 ...2b|!2b?