Hello, i'm building a wrapper to mysql c api. then i made a wrapper to static library. no error and produce static library (wrapper.a)
i copy the file to c:\dev-c++\lib\libwrapper.a
but, when i used that static library by linking my application to -lwrapper, getting many linker error.
help me please, how to make static library and how to linking it to application or any references ?
thanks
"-l" not used for static libraries. They are only a bunch of .o files, so you have to add them in the linker command line as an object file:
gcc foo.o ... libfoo.a -o test
Log in to post a comment.
Hello,
i'm building a wrapper to mysql c api.
then i made a wrapper to static library.
no error and produce static library (wrapper.a)
i copy the file to c:\dev-c++\lib\libwrapper.a
but, when i used that static library by linking my application to -lwrapper, getting many linker error.
help me please, how to make static library and how to linking it to application or any references ?
thanks
"-l" not used for static libraries. They are only a bunch of .o files, so you have to add them in the linker command line as an object file:
gcc foo.o ... libfoo.a -o test