Menu

How to make static library with dev-c++

2002-08-09
2012-09-26
  • Nobody/Anonymous

    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

     
    • Nobody/Anonymous

      "-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.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.