Menu

Use a .lib library

2009-01-11
2012-09-26
  • thedarkhero

    thedarkhero - 2009-01-11

    How can I include a .lib library to compile my source file?

     
    • cpns

      cpns - 2009-01-11

      That depends what a .lib library is!

      File extensions are merely a convention, while GNU uses .a by convention, it is not unheard of for the less-informed to build GNU libraries with .lib extensions. Moreover both Borland and Microsoft conventionally use teh .lib extension, but neither are compatible.

      It is possible to use Microsoft .lib files if they are merely export libraries for a DLL, by converting them using reimp.exe. This however will only work if the DLL presents a C linkage interface (i.e. no C++ interfaces). Microsoft static libraries are compatible with GCC 4.x, but Dev-C++ ships with a earlier 3.x version.

      Other than that, for open source libraries, rebuild from source.

      Clifford

       

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.