[so] [Tema 2][Linux] Apelare functii decrypt_*

Mihail Costea mihail.costea2005 at gmail.com
Wed Mar 28 16:07:19 EEST 2012


Initial primeam si eu urmatoarea eroare:
/usr/bin/ld: skipping incompatible ./libcrypto.so when searching for
-lcrypto

Am adaugat -m32 (am SO pe 64 biti) si gcc-multilib si g++-multilib, dar
primesc eroare asta cand incerc sa compilez:

# g++ -m32 server.cpp unix*.cpp -lrt -lcrypto -m32
/tmp/ccdtPP4Z.o: In function `main':
server.cpp:(.text+0x1f6): undefined reference to `decrypt_base64(void*,
int, void*)'
server.cpp:(.text+0x21d): undefined reference to `decrypt_des(void*, int,
void*)'
server.cpp:(.text+0x241): undefined reference to `decrypt_bf(void*, int,
void*)'
server.cpp:(.text+0x265): undefined reference to `decrypt_rc2(void*, int,
void*)'
collect2: ld returned 1 exit status


2012/3/27 Bogdan Ivanov <ivn_bogdan at yahoo.com>

>
> > Inseamna ca folosesti OS pe 64 de biti. Trebuie sa compilezi cu -m32
> > si sa instalezi eventualele bibilioteci pe 32 de biti necesare.
>
>
> Multumesc mult! Asta era problema.
> Am adaugat flag-ul -m32 si am instalat gcc-multilib !
>
> Mersi,
> Bogdan
>
> _______________________________________________
> http://elf.cs.pub.ro/so/wiki/resurse/lista-discutii
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/so/attachments/20120328/17eb7099/attachment.html>


More information about the so mailing list