<div dir="ltr">Ah, nu stiu cum de uitasem -pthread. Mersi :D<br><br>Acum am:<br><br>LibMonitor.so: undefined reference to `decEnter'<br>LibMonitor.so: undefined reference to `decCond'<br>LibMonitor.so: undefined reference to `incWait'<br>
LibMonitor.so: undefined reference to `incCond'<br>LibMonitor.so: undefined reference to `decWait'<br>LibMonitor.so: undefined reference to `incSignal'<br>LibMonitor.so: undefined reference to `decSignal'<br>
collect2: ld returned 1 exit status<br><br>Eu am inclus in biblioteca si "CallbackMonitor.h" unde erau definite functiile astea, iar la link-are ii dau si ControlMonitor.c unde sunt ele implementate. Ce uit?<br>
<br>Multumesc anticipat! :)<br><br><div class="gmail_quote">2008/8/7 Andrei Deftu <span dir="ltr"><<a href="mailto:andreideftu@yahoo.com">andreideftu@yahoo.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><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.<div><div></div><div class="Wj3C7c"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
----- Original Message ----<br>From: Aurelian Bogdan <<a href="mailto:aurelian.bogdan@gmail.com" target="_blank">aurelian.bogdan@gmail.com</a>><br>To: <a href="mailto:so@cursuri.cs.pub.ro" target="_blank">so@cursuri.cs.pub.ro</a><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></div></div><br>
</div><br>_______________________________________________<br>
so mailing list<br>
<a href="mailto:so@cursuri.cs.pub.ro">so@cursuri.cs.pub.ro</a><br>
<a href="http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so" target="_blank">http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so</a><br>
<br></blockquote></div><br></div>