configuration - how to find which libraries to link to? or, how can I create *-config (such as sdl-config, llvm-config)? -


I want to write a program that gives a list of libraries that link to the given source code (or object) files (For C or C ++ programs).

* In Nicos, there are useful tools like sdl-config and llvm-config but, I want to make my program work on Windows.

Usage:

  get-library-names -l / path / to / lib a.cpp b. Cpp c.cpp d.obj  

Then, a list of get-library-names function names will be received which is implemented from a CPP, BQPP. , C.cpp, and d.obj and, it will do all necessary searches to properly link all library files to the / path / to / lib directory and list libraries.

Is such a device already written? Is not such a tool insignificant?

Thank you.

Yes, which library can you link to? , You can create a PKG-config file that will allow you to run the 'pkg-config-cflags' to obtain compiler flags or 'pkg-config -libs' to get the linker libraries.

If you are on Linux, then some examples. To find PC files, try looking in / usr / lib / pkgconfig, which you can use as a model. You can still use pkg-config on Windows, but there is nothing that comes with it.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -