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

Mihail Costea mihail.costea2005 at gmail.com
Thu Mar 29 21:07:26 EEST 2012


Dupa ce am irosit mult timp pe degeaba, am descoperit problema: c++. Am
trecut la c pur si merge (nici pe 32 biti nu a vrut c++).

2012/3/28 Mihail Costea <mihail.costea2005 at gmail.com>

> Am gasit link-ul. Acum sa vad daca merge.
>
>
> 2012/3/28 Mihail Costea <mihail.costea2005 at gmail.com>
>
>> LD_LIBRARY_PATH e pus caci altfel nu imi ruleaza client.
>> Cat despre server ma las pagubas. Am pus si: <g++ server.cpp unix_*.cpp
>> -m32 -lrt -lcrypto -L. -o server> si tot nimic.
>> Unde pot gasi masina virtuala?
>>
>>
>> On 28 March 2012 16:32, Irina Preșa <irina.presa at gmail.com> wrote:
>>
>>> On Wed, Mar 28, 2012 at 4:07 PM, Mihail Costea
>>> <mihail.costea2005 at gmail.com> wrote:
>>> > 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
>>> >
>>>
>>> Ai uitat să-i specifici linkerului unde să caute biblioteca (-Ldir sau
>>> -L. dacă se află în directorul curent).
>>> LD_LIBRARY_PATH va fi citită doar de loader pentru a încărca
>>> biblioteca la runtime. Dar și linkerul trebuie să știe unde o găsește,
>>> pentru a crea referințe.
>>>
>>> --
>>> Irina
>>> _______________________________________________
>>> 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/20120329/da525d4f/attachment.html>


More information about the so mailing list