<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"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Modifica si targetul de build bin la modul:<br><br>bin: main.o<br> g++ -L. -lcrypto main.o -o bin<br><br>Dragos<br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> lupescu <lupescu_grigore@hotmail.com><br><b><span style="font-weight: bold;">To:</span></b> so@cursuri.cs.pub.ro<br><b><span style="font-weight: bold;">Sent:</span></b> Thu, March 24, 2011 3:35:29 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [so] [ tema 2 ] Legare biblioteca partajata la aplicatie<br></font><br>Nup, tot "no reference". Ca idee incercasem si doar cu gcc sa compilez si tot
<br>tipa.Incercasem sa ma mai joc si cu pozitionarea partii de legare a librariei <br>dar am avut erori de genul "does not exist", hence<br>o vede dar aparent nu gaseste functia respectiva.<br>Deci am asa :<br><br><br>///////////////////////////////////////////////////<br>Makefile<br>//////////////////////////////////////////////////<br><br>CFLAGS = -Wall -W<br><br>make: clean bin<br><br>bin: main.o<br> g++ -Wl,-rpath -llibcrypto -L. main.o -o bin <br><br>main.o: main.cpp<br> g++ -c main.cpp $(CFLAGS) <br><br>clean:<br> rm -f bin<br> rm -f *.o<br><br>///////////////////////////////////////////////////<br>main.cpp<br>//////////////////////////////////////////////////<br><br>#include <stdio.h><br><br>#ifdef __cplusplus<br>extern "C" {<br>#endif<br><br>int crypt_des(void *in, int len, void *out);<br><br>#ifdef
__cplusplus<br>}<br>#endif<br><br><br>int main(void)<br>{<br> crypt_des(NULL,0,NULL);<br> printf("E ok\n");<br> return 0;<br>}<br><br>_______________________________________________<br><a href="http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii" target="_blank">http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii</a><br></div></div>
</div><br>
</body></html>