How do I determine whether a function exists within a library, or list out the functions in a compiled library?
You can set these when you run make : LIBS=-lmylib LDFLAGS=-L/path/to/mylib make . This relies on the Makefile having been written to use such variables however, which one generated by a system like autoconf probably will, but one written by hand may not.
A collection of files used as a library, you should, as long as there is only one main in the program. Call it something else. You can't have main() in a library, that's just silly.
Dev-C++ by default is installed with the MinGW/GCC compiler. If the archive is not specifically built to work with MinGW (for example it may be a Cygwin or Linux archive), you will not be able to link it to MinGW generated code. If the archive is a MinGW/GCC compatible library, then you simply link it to your code.
You can use the nm command to list the symbols in static libraries.
nm -g -C <libMylib.a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With