Questions about *.a files on windows

In summary: Archive" file type for WindowsI downloaded strawberry pearl and I was looking through the library files, they are in .a files which according to google is a unix archive file type? According to the website tldp.org, ".a" files are "static libraries", which are program fragments made from ".o" (object code) files. When looking at the contents of these .a files in a hex editor, it appears that they are mostly .dll files. However, there are a few .a files with a different header, and according to one of the links that I
  • #1
hzp
10
0
I downloaded strawberry pearl and I was looking through the library files, they are in .a files which according to google is a unix archive file type?

I have seen them in use in other places as well and I want to learn more about them, but I don't have unix running

How can I go about opening this types of files? To look at their contents

Thank you
 
Technology news on Phys.org
  • #2
unix archive files can have any suffix, but the usual one is ".ar"
the .a files are likely "static libraries", sort of program fragments made from .o (object code) files.
http://tldp.org/HOWTO/Program-Library-HOWTO/static-libraries.html

To learn more about how UNIX does things, but without the expense, you could consider solaris or some form of linux.
 
  • #3
Simon Bridge said:
unix archive files can have any suffix, but the usual one is ".ar"
the .a files are likely "static libraries", sort of program fragments made from .o (object code) files.
http://tldp.org/HOWTO/Program-Library-HOWTO/static-libraries.html

To learn more about how UNIX does things, but without the expense, you could consider solaris or some form of linux.

Thank you for the reply. There are other files I am interested in - they have a different header when I open them in a hex editor. For example the lib files
have "!<arch>./ ", and these particular files have variations on "ARCH000..1..ý..á", all beginning ARCH000, is this some kind of custom archive?
 
  • #4
The .lib files may be "dynamic libraries" as opposed to the "static libraries" that Simon mentioned.
 
  • #5
jtbell said:
The .lib files may be "dynamic libraries" as opposed to the "static libraries" that Simon mentioned.

Oh okay but my interests are the differences between these two files that have the same extension but seem to be different

The extension is .a
 
  • #6
Well...I just googled "strawberry perl" is a Perl environment for Windows (downloaded and installed for the heck of it).

But (wikipedia) Perl was invented for Unix back in 1987...so, for they to provide you with as UNIX experience as possible on Windows, they have packaged a few things in your download package, including a minimalistic "unix-like" envrionment called MinGW (refer to installation directory C:\perl\c\i686-w64-mingw32\bin) and a bunch of unix utilities including the command "ar".

So, if you launch your perl command line, you actually have access to the "ar" command (you may need to specify full path to it) and you should be able to inspect one of those *.a file with command "ar tv filename.a" ...I did


If looks like the contents inside some of those *.a files is nothing else but *.dll files.

Anyway, read up on UNIX command "ar" to learn about *.a files.

Alternately, I seems that winzip-like Windows utility IZArc can handl *.a files, if that is easier...did not try this.
.
 
  • #7
gsal said:
Well...I just googled "strawberry perl" is a Perl environment for Windows (downloaded and installed for the heck of it).

But (wikipedia) Perl was invented for Unix back in 1987...so, for they to provide you with as UNIX experience as possible on Windows, they have packaged a few things in your download package, including a minimalistic "unix-like" envrionment called MinGW (refer to installation directory C:\perl\c\i686-w64-mingw32\bin) and a bunch of unix utilities including the command "ar".

So, if you launch your perl command line, you actually have access to the "ar" command (you may need to specify full path to it) and you should be able to inspect one of those *.a file with command "ar tv filename.a" ...I did


If looks like the contents inside some of those *.a files is nothing else but *.dll files.

Anyway, read up on UNIX command "ar" to learn about *.a files.

Alternately, I seems that winzip-like Windows utility IZArc can handl *.a files, if that is easier...did not try this.
.

Yes this works for the first type of *.a files which seems to be the standard but these other *.a files the format is not recognized. The files I mentioned earlier with the same extension but different headers

Basically I'm trying to figure out if anyone has any knowledge of these different types of *.a files
 
  • #8
Maybe you should attach the files so people can inspect them by themselves
 
  • #9
gsal said:
Maybe you should attach the files so people can inspect them by themselves

Here you go buddy
 

Attachments

  • fonts.zip
    14.4 KB · Views: 303
  • #10
Hhhhmmm...the heading sure does not match the specified " !<arch> " for the "ar" format.

Another google search seems to reveal that somebody is doing something on purpose that is not supported by any official tool...like packing certain things into games, obfuscating, compressing, etc., and making difficult to retrieve...I am not a gamer, so, I don't know these things...but read up on these two links:

zenhax thread

QuickBMS script shows the "ARCH000" that your file has.
 
  • Like
Likes harborsparrow
  • #11
gsal said:
Hhhhmmm...the heading sure does not match the specified " !<arch> " for the "ar" format.

Another google search seems to reveal that somebody is doing something on purpose that is not supported by any official tool...like packing certain things into games, obfuscating, compressing, etc., and making difficult to retrieve...I am not a gamer, so, I don't know these things...but read up on these two links:

zenhax thread

QuickBMS script shows the "ARCH000" that your file has.

Yes, you're exactly right! This is from the resource folder of The Binding of Isaac: Rebirth. Thank you for the information
 

Related to Questions about *.a files on windows

1. What is a .a file on Windows?

A .a file on Windows is a static library file. It contains a collection of precompiled functions, classes, and other code that can be linked to a program during the compilation process. This allows for faster execution of the program as the code does not need to be compiled every time the program is run.

2. How do I open a .a file on Windows?

You cannot directly open a .a file on Windows as it is not meant to be executed on its own. It is meant to be linked to a program during the compilation process. You will need to use a compiler, such as GCC or Visual Studio, to link the .a file to your program.

3. Can a .a file be converted to a different file format?

Yes, a .a file can be converted to a different file format, such as a .dll or .lib file, using a tool called "ar" which is included in most compilers. This can be useful if you need to use the library on a different platform or with a different compiler.

4. Are .a files only used on Windows?

No, .a files can also be used on other operating systems, such as Linux and macOS. However, they are more commonly used on Windows as the equivalent file format on other operating systems is usually .so or .dylib.

5. Can I edit a .a file on Windows?

You can edit the source code that is used to create a .a file, but you cannot directly edit the .a file itself. To make changes to the .a file, you will need to recompile the source code and create a new .a file. It is not recommended to edit a .a file directly as it can cause errors and compatibility issues.

Similar threads

  • Programming and Computer Science
Replies
14
Views
1K
  • Programming and Computer Science
Replies
9
Views
896
  • Programming and Computer Science
Replies
9
Views
2K
  • Programming and Computer Science
Replies
29
Views
2K
  • Programming and Computer Science
Replies
2
Views
783
  • Computing and Technology
Replies
5
Views
1K
  • Programming and Computer Science
Replies
18
Views
1K
  • Computing and Technology
Replies
3
Views
2K
  • Programming and Computer Science
Replies
19
Views
3K
  • Programming and Computer Science
Replies
4
Views
507
Back
Top