On Thu, Sep 16, 2021 at 6:22 PM Samyukta Yagati <sa...@berkeley.edu> wrote:
>
> As a follow up: I tried running
>
> >> clang++ -g2 -O3 -l /usr/local/include /usr/local/lib/libcryptopp.a -WI,-L
>
> And got the error:
> ld: library not found for -l/usr/local/include
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)

That's an "I" as in "include", bot a lowercase "L".

Use this command:

clang++ -g2 -O3 -I /usr/local/include test.cxx
/usr/local/lib/libcryptopp.a -o test.exe

An archive like libcryptopp.a is just a collection of object files. It
is equivalent to saying:

clang++ -g2 -O3 -I /usr/local/include test.cxx
/usr/local/lib/cryptlib.o /usr/local/lib/cpu.o
/usr/local/lib/integer.o ... -o test.exe

A share object like libcryptopp.dylib or libcryptopp.so is the same
collection of object files in an executable format that can be loaded
at runtime.

Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cryptopp-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/cryptopp-users/CAH8yC8mCGpoOq3Si5M%2B_6AtJ6GAuqBUn%3D-Dh67Q%2BHP5cc%3DEX9g%40mail.gmail.com.

Reply via email to