[so] Testare separata monitor - Tema 4
Andrei Deftu
andreideftu at yahoo.com
Thu Aug 7 10:07:47 EEST 2008
gcc -Wall -g -o Test _test/Test.o _test/TestMonitor.o _test/TestRW.o _test/TestStres.o _test/Test1.o _test/Test2.o _test/Test3.o _test/Test4.o _test/Test5.o _test/Test6.o _test/ControlRW.o _test/ControlMonitor.o -pthread LibMonitor.so
Observa linkarea cu bibliotecile pthread si LibMonitor.
----- Original Message ----
From: Aurelian Bogdan <aurelian.bogdan at gmail.com>
To: so at cursuri.cs.pub.ro
Sent: Thursday, August 7, 2008 9:51:32 AM
Subject: [so] Testare separata monitor - Tema 4
Salut!
Incercam sa testez monitorul separat de cealalta biblioteca Readers-Writers. Pana acum nu am reusit. Poate ma ajuta cineva...
Am dat urmatoarele comenzi:
#creare biblioteca partajata
gcc -c monitor.c
gcc -shared -fPIC monitor.o -o libMonitor.so #Stiu ca in tema e numele cu "L"(LibMonitor.so). E vreo diferenta?
#creare program de test - main() este in test.c si apeleaza TestMonitor() pe care am copiat-o direct aici din sursa cu acelasi nume.
gcc Test1.c Test2.c Test3.c Test4.c Test5.c Test6.c ControlMonitor.c test.c -o test -lMonitor -L.
Rezultat:
/tmp/ccO95MO7.o: In function `Test2':
Test2.c:(.text+0x264): undefined reference to `pthread_create'
Test2.c:(.text+0x2a3): undefined reference to `pthread_create'
Test2.c:(.text+0x2d2): undefined reference to `pthread_join'
Test2.c:(.text+0x301): undefined reference to `pthread_join'
/tmp/ccy06oPd.o: In function `Test3':
Test3.c:(.text+0x867): undefined reference to `pthread_create'
Test3.c:(.text+0x8a6): undefined reference to `pthread_create'
Test3.c:(.text+0x8e5): undefined reference to `pthread_create'
Test3.c:(.text+0x924): undefined reference to `pthread_create'
Test3.c:(.text+0x953): undefined reference to `pthread_join'
Test3.c:(.text+0x982): undefined reference to `pthread_join'
Test3.c:(.text+0x9b1): undefined reference to `pthread_join'
Test3.c:(.text+0x9e0): undefined reference to `pthread_join'
/tmp/ccbj6vye.o: In function `Test4':
Test4.c:(.text+0x88f): undefined reference to `pthread_create'
Test4.c:(.text+0x8ce): undefined reference to `pthread_create'
Test4.c:(.text+0x90d): undefined reference to `pthread_create'
Test4.c:(.text+0x94c): undefined reference to `pthread_create'
Test4.c:(.text+0x98b): undefined reference to `pthread_create'
Test4.c:(.text+0x9ba): undefined reference to `pthread_join'
Test4.c:(.text+0x9e9): undefined reference to `pthread_join'
Test4.c:(.text+0xa18): undefined reference to `pthread_join'
Test4.c:(.text+0xa47): undefined reference to `pthread_join'
Test4.c:(.text+0xa76): undefined reference to `pthread_join'
/tmp/cc4Lqtnj.o: In function `Test5':
Test5.c:(.text+0x876): undefined reference to `pthread_create'
Test5.c:(.text+0x8b5): undefined reference to `pthread_create'
Test5.c:(.text+0x8f4): undefined reference to `pthread_create'
Test5.c:(.text+0x933): undefined reference to `pthread_create'
Test5.c:(.text+0x962): undefined reference to `pthread_join'
Test5.c:(.text+0x991): undefined reference to `pthread_join'
Test5.c:(.text+0x9c0): undefined reference to `pthread_join'
Test5.c:(.text+0x9ef): undefined reference to `pthread_join'
/tmp/ccviQM2s.o: In function `Test6':
Test6.c:(.text+0x931): undefined reference to `pthread_create'
Test6.c:(.text+0x970): undefined reference to `pthread_create'
Test6.c:(.text+0x9af): undefined reference to `pthread_create'
Test6.c:(.text+0x9ee): undefined reference to `pthread_create'
Test6.c:(.text+0xa2d): undefined reference to `pthread_create'
Test6.c:(.text+0xa5c): undefined reference to `pthread_join'
Test6.c:(.text+0xa8b): undefined reference to `pthread_join'
Test6.c:(.text+0xaba): undefined reference to `pthread_join'
Test6.c:(.text+0xae9): undefined reference to `pthread_join'
Test6.c:(.text+0xb18): undefined reference to `pthread_join'
./libMonitor.so: undefined reference to `decEnter'
./libMonitor.so: undefined reference to `decCond'
./libMonitor.so: undefined reference to `pthread_key_create'
./libMonitor.so: undefined reference to `incWait'
./libMonitor.so: undefined reference to `incCond'
./libMonitor.so: undefined reference to `pthread_getspecific'
./libMonitor.so: undefined reference to `decWait'
./libMonitor.so: undefined reference to `incSignal'
./libMonitor.so: undefined reference to `decSignal'
./libMonitor.so: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/so/attachments/20080807/3d6f967a/attachment.htm
More information about the so
mailing list