Make Library

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • seforo
    New Member
    • Nov 2006
    • 60

    Make Library

    Hi Guys,

    I want to learn how to make a library out of my .cpp's and .h's file. Can you please give me some reference that I can read
  • DeMan
    Top Contributor
    • Nov 2006
    • 1799

    #2
    it shoudl depend on compile time arguments.....w hich compiler (and/or) IDE are you using

    Comment

    • seforo
      New Member
      • Nov 2006
      • 60

      #3
      I am using GCC(GNU Compiler Collection) on rat hat linux

      Comment

      • DeMan
        Top Contributor
        • Nov 2006
        • 1799

        #4
        To make a static library:

        Code:
        gcc -c filetocompile.cpp
        You will get an object (.o) file.
        You can link multiple object files together for your library by using
        Code:
        gcc -o library_name.a file1.o file2.o

        Comment

        • vpawizard
          New Member
          • Nov 2006
          • 66

          #5
          Hello,
          What type of library do you want to create - static or shared? The following link is a good reference:
          http://users.actcom.co .il/~choo/lupg/tutorials/libraries/unix-c-libraries.html
          http://www.adp-gmbh.ch/cpp/gcc/create_lib.html

          Regards,

          Comment

          • kky2k
            New Member
            • May 2007
            • 34

            #6
            Originally posted by vpawizard
            Hello,
            What type of library do you want to create - static or shared? The following link is a good reference:
            http://users.actcom.co .il/~choo/lupg/tutorials/libraries/unix-c-libraries.html
            http://www.adp-gmbh.ch/cpp/gcc/create_lib.html

            Regards,
            very usefull link thanks for that...

            Comment

            Working...