[so] [Tema 2][Linux] Apelare functii decrypt_*
Mirea Bogdan-Stefan
b.mirea at yahoo.com
Tue Mar 27 16:00:04 EEST 2012
Bogdan Ivanov <ivn_bogdan at ...> writes:
>
>
> Salut,
>
> Nu reusesc sa apelez functiile de decriptare din server, cel mai probabil
pentru ca nu incarc libraria cum trebuie.
> Eu fac asa: cu include "crypto.h" in server il compilez cu:
> gcc -Wall -lrt -o server server.o common.o
> caz in care obtin: server.c:(.text+0x1e9): undefined
> reference to `decrypt_base64'
>
> probabil ca ar trebui inclusa libraria la compilare nu? Folosind flag-ul -l
> Am incercat si cu:
>
> gcc -Wall -lrt -llibcrypto -o gateway gateway.o common.o dar:
> /usr/bin/ld: cannot find -llibcrypto
> (daca are vreo importanta
> din terminarul din care rulez make am setat variabila de mediu
LD_LIBRARY_PATH)
>
> Cum trebuie incarcata libraria corect?
> Multumesc,
> Bogdan
>
> _______________________________________________
> http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii
Salut,
Am avut si eu problema de genul asta si pt simplitate, mi-am facut un makefile
care ruleaza doar comenzi gcc una dupa alta, fara CFLAGS, CPPFLAGS etc...
Makefile-ul meu arata asa:
build:
gcc -Wall -c -o gateway.o gateway.c
gcc -Wall -c -o unix_queue.o unix_queue.c
gcc -Wall -c -o unix_shm.o unix_shm.c
gcc -Wall -c -o unix_sem.o unix_sem.c
gcc -Wall -c -o server.o server.c
gcc gateway.o unix_queue.o unix_shm.o unix_sem.o -o gateway -lrt
gcc server.o unix_queue.o unix_shm.o unix_sem.o -o server -lrt
-lcrypto -L.
clean:
rm *.o
rm server gateway
More information about the so
mailing list