External library linking errors

55 views
Skip to first unread message

Jordan Hedges

unread,
Oct 8, 2018, 10:32:49 PM10/8/18
to ns-3-users
I'm having trouble building a program that requires external libraries, specifically libgcrypt and gmp (requiring -lgcrypt and -lgmpxx -lgmp respectively).

Following https://www.nsnam.org/wiki/HOWTO_use_ns-3_with_other_libraries I added conf.env.append_value("LINKFLAGS", ["-lgcrypt", "-lgmpxx", "-lgmp"]) to the wscript and ran it, and it failed with errors similar to "undefined reference to `gcry_md_open'" for various calls on linking. However, the error from ns-3 indicates that the flags were correctly passed in: "['/usr/bin/g++', '-lgcrypt', '-lgmpxx', '-lgmp' " and the external libraries are installed correctly and test programs have both compiled and run correctly with just the above flags. Is there something I am missing or some new documentation that supersedes the above link?

Jordan Hedges

unread,
Oct 9, 2018, 12:58:08 AM10/9/18
to ns-3-users
I realised I forgot to mention that the program I am creating is in the scratch folder, so I am currently modifying the top-level wscript.

Caleb Bowers

unread,
Jun 4, 2019, 12:18:01 PM6/4/19
to ns-3-users
I am experiencing the same problem in the scratch folder
Reply all
Reply to author
Forward
0 new messages