question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] explicitly link against static library's version

See original GitHub issue

If “conan’ized” library provides both static (libfoo.a) and shared (libfoo.so) libraries what is the most idiomatic way to link against static (i.e. libfoo.a) in my executable application? For now I am always linking against shared version of libfoo.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
madebrcommented, Jul 3, 2020

@shivarajshivu If the error happens during executing, then traci is a shared library. Run ldd on the my_exe executable to see what shared libraries it needs.

1reaction
jgsogocommented, Mar 4, 2019

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Telling gcc directly to link a library statically - Stack Overflow
When you tell gcc or ld -Ldir -lLIBRARY , linker will check both static and dynamic versions of library (you can see a...
Read more >
How to handle dynamic and static libraries in Linux
Knowing how Linux uses libraries, including the difference between static and dynamic linking, can help you fix dependency problems.
Read more >
Link error after including a static library - Page 2 - NI Community
Hello In order to debug a library, I built the library files with a main module and a uir as debug executable. Now...
Read more >
D.1.3 Differences between static and shared libraries
A shared library consists of an archive of object files ( .o files) collected into one file by either the compiler or the...
Read more >
Link Options (Using the GNU Compiler Collection (GCC))
If libasan is available as a shared library, and the -static option is not used, then this links against the shared version of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found