What are .a files?

This is a discussion on What are .a files? within the C++ Programming forums, part of the General Programming Boards category; Hi. So what are they exactly? If I remember correctly, then SDL uses .a file too. At linking time I ...

  1. #1
    Registered User
    Join Date
    Jan 2005
    Location
    Estonia
    Posts
    131

    What are .a files?

    Hi.

    So what are they exactly? If I remember correctly, then SDL uses .a file too. At linking time I just had to -lSDL and a file called libSDL.a was linked. I also had to include a header called SDL/SDL.h or something like that.

    if libSDL.a contains definitions of functions, then why can't the definitions be in a .o file? Thus, at linking time, I'd just link the .o file and be done with it.
    Programming is a form of art.

  2. #2
    ZuK
    ZuK is offline
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    .a files are static libraries, basically just collections of .o files.
    Kurt

  3. #3
    Registered User
    Join Date
    Jan 2005
    Location
    Estonia
    Posts
    131
    how can I make my own collections of .o files?
    Programming is a form of art.

  4. #4
    ZuK
    ZuK is offline
    Registered User
    Join Date
    Aug 2005
    Location
    Austria
    Posts
    1,990
    use ar
    Code:
    man ar
    should give you all the information you need.
    Kurt

  5. #5
    Registered User
    Join Date
    Jan 2005
    Location
    Estonia
    Posts
    131
    thanks
    Programming is a form of art.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Create Copies of Files
    By Kanshu in forum C++ Programming
    Replies: 13
    Last Post: 05-09-2009, 07:53 AM
  2. add source files to embedded VC 4.0
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2006, 03:28 AM
  3. *.cpp and *.h files understanding
    By ElastoManiac in forum C++ Programming
    Replies: 4
    Last Post: 06-11-2006, 04:45 AM
  4. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 10:46 AM
  5. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 01:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21