inclusion of crypto ++ library in ns3

184 views
Skip to first unread message

Abhinav Ramesh

unread,
Dec 13, 2022, 3:08:38 AM12/13/22
to ns-3-users
How to include cryptography libraries like crypto++ using cmake in ns3.

Gabriel Ferreira

unread,
Dec 14, 2022, 12:26:18 PM12/14/22
to ns-3-users
If you don't care about linking it to everything, just dump the following in the directory CMakeLists.txt that you want to link it.

find_library(CRYPTOPP crypto++)
link_libraries(${CRYPTOPP})

If you care, then read the manual.
https://www.nsnam.org/docs/manual/html/working-with-cmake.html#linking-third-party-libraries

Abhinav Ramesh

unread,
Apr 11, 2023, 2:39:35 PM4/11/23
to ns-3-users
Thank you . It worked for me when i used 

find_package(PkgConfig REQUIRED)
pkg_check_modules(Cryptopp REQUIRED IMPORTED_TARGET libcrypto++) 
target_link_libraries(your_application PUBLIC PkgConfig::Cryptopp)
Reply all
Reply to author
Forward
0 new messages