Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to add a function to a static library which will get the full path of this library. Is that possible. There are ways to do that when it comes to a DLL, but I couldn't find out a solution for finding the path of a static library at runtime.
Posted
Comments
pasztorpisti 21-Sep-13 11:26am    
Maybe I just misunderstood your question but the used code (usually only the used object files) of a static library is compiled to the exe or dll that uses the static library. The path to the static lib that was used during program linking is useless at runtime...
Sergey Alexandrovich Kryukov 21-Sep-13 21:58pm    
Exactly. The question simply makes no sense.
—SA
Richard MacCutchan 21-Sep-13 12:17pm    
You can't, whatever you do it will return the path of the executable file.
Michael Haephrati 21-Sep-13 16:54pm    
That might be true, but you can locate a path of a DLL for example
Sergey Alexandrovich Kryukov 21-Sep-13 21:59pm    
It has nothing to do with the idea of "static library". Maybe you just used confusing terminology. DLL is never a static library.
What exactly do your mean?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900