<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt">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 <br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br>Observa linkarea cu bibliotecile pthread si LibMonitor.<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Aurelian Bogdan <aurelian.bogdan@gmail.com><br>To: so@cursuri.cs.pub.ro<br>Sent: Thursday, August 7, 2008 9:51:32 AM<br>Subject: [so] Testare separata monitor - Tema 4<br><br><div dir="ltr">Salut!<br><br>Incercam sa testez monitorul separat de cealalta biblioteca Readers-Writers.
Pana acum nu am reusit. Poate ma ajuta cineva...<br>Am dat urmatoarele comenzi:<br><br>#creare biblioteca partajata<br>
gcc -c monitor.c<br>gcc -shared -fPIC monitor.o -o libMonitor.so #Stiu ca in tema e numele cu "L"(LibMonitor.so). E vreo diferenta?<br><br>#creare program de test - main() este in test.c si apeleaza TestMonitor() pe care am copiat-o direct aici din sursa cu acelasi nume.<br>
gcc Test1.c Test2.c Test3.c Test4.c Test5.c Test6.c ControlMonitor.c test.c -o test -lMonitor -L.<br><br>Rezultat:<br><br>/tmp/ccO95MO7.o: In function `Test2':<br>Test2.c:(.text+0x264): undefined reference to `pthread_create'<br>
Test2.c:(.text+0x2a3): undefined reference to `pthread_create'<br>Test2.c:(.text+0x2d2): undefined reference to `pthread_join'<br>Test2.c:(.text+0x301): undefined reference to `pthread_join'<br>/tmp/ccy06oPd.o: In function `Test3':<br>
Test3.c:(.text+0x867): undefined reference to `pthread_create'<br>Test3.c:(.text+0x8a6): undefined reference to `pthread_create'<br>Test3.c:(.text+0x8e5): undefined reference to `pthread_create'<br>Test3.c:(.text+0x924): undefined reference to `pthread_create'<br>
Test3.c:(.text+0x953): undefined reference to `pthread_join'<br>Test3.c:(.text+0x982): undefined reference to `pthread_join'<br>Test3.c:(.text+0x9b1): undefined reference to `pthread_join'<br>Test3.c:(.text+0x9e0): undefined reference to `pthread_join'<br>
/tmp/ccbj6vye.o: In function `Test4':<br>Test4.c:(.text+0x88f): undefined reference to `pthread_create'<br>Test4.c:(.text+0x8ce): undefined reference to `pthread_create'<br>Test4.c:(.text+0x90d): undefined reference to `pthread_create'<br>
Test4.c:(.text+0x94c): undefined reference to `pthread_create'<br>Test4.c:(.text+0x98b): undefined reference to `pthread_create'<br>Test4.c:(.text+0x9ba): undefined reference to `pthread_join'<br>Test4.c:(.text+0x9e9): undefined reference to `pthread_join'<br>
Test4.c:(.text+0xa18): undefined reference to `pthread_join'<br>Test4.c:(.text+0xa47): undefined reference to `pthread_join'<br>Test4.c:(.text+0xa76): undefined reference to `pthread_join'<br>/tmp/cc4Lqtnj.o: In function `Test5':<br>
Test5.c:(.text+0x876): undefined reference to `pthread_create'<br>Test5.c:(.text+0x8b5): undefined reference to `pthread_create'<br>Test5.c:(.text+0x8f4): undefined reference to `pthread_create'<br>Test5.c:(.text+0x933): undefined reference to `pthread_create'<br>
Test5.c:(.text+0x962): undefined reference to `pthread_join'<br>Test5.c:(.text+0x991): undefined reference to `pthread_join'<br>Test5.c:(.text+0x9c0): undefined reference to `pthread_join'<br>Test5.c:(.text+0x9ef): undefined reference to `pthread_join'<br>
/tmp/ccviQM2s.o: In function `Test6':<br>Test6.c:(.text+0x931): undefined reference to `pthread_create'<br>Test6.c:(.text+0x970): undefined reference to `pthread_create'<br>Test6.c:(.text+0x9af): undefined reference to `pthread_create'<br>
Test6.c:(.text+0x9ee): undefined reference to `pthread_create'<br>Test6.c:(.text+0xa2d): undefined reference to `pthread_create'<br>Test6.c:(.text+0xa5c): undefined reference to `pthread_join'<br>Test6.c:(.text+0xa8b): undefined reference to `pthread_join'<br>
Test6.c:(.text+0xaba): undefined reference to `pthread_join'<br>Test6.c:(.text+0xae9): undefined reference to `pthread_join'<br>Test6.c:(.text+0xb18): undefined reference to `pthread_join'<br>./libMonitor.so: undefined reference to `decEnter'<br>
./libMonitor.so: undefined reference to `decCond'<br>./libMonitor.so: undefined reference to `pthread_key_create'<br>./libMonitor.so: undefined reference to `incWait'<br>./libMonitor.so: undefined reference to `incCond'<br>
./libMonitor.so: undefined reference to `pthread_getspecific'<br>./libMonitor.so: undefined reference to `decWait'<br>./libMonitor.so: undefined reference to `incSignal'<br>./libMonitor.so: undefined reference to `decSignal'<br>
./libMonitor.so: undefined reference to `pthread_setspecific'<br>collect2: ld returned 1 exit status<br><br><br><br><br><br><br></div></div></div></div><br>
</body></html>