Menu

How to make libraries?

2003-01-31
2012-09-26
  • Nobody/Anonymous

    Someone know how to create libraries of c++ code, from dev-c++?, I am not talking about dlls, I think that this kind of files have a ".a" extension.

    Thanks in advance,

    Mnica

     
    • Patrick Ogay

      Patrick Ogay - 2003-01-31

      if you link with win32 static lib (project option) you get a    file  filename.a (which seems to be a lib).

      Actually *I* just wanted to compile my project in a way that al libs are linked statically.

      I think you link it in that way, and in a second step, you link this .a file to the other files giving in the link options the created lib. .

      Patrick

       
    • upcase

      upcase - 2003-02-02

      Here's what I'd recommend:
      Simply compile, not link the code you want in your lib (using -c). do this with all the code you want in the lib, so that you geta bunch of object (.o) files. Afterwards use the command "ar" to "build" the archive (lib) includeing all the object files. Check ar for it's options (I guess ar --help should do).
      This way you get your .a library.

       

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.