473,387 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

MinGW libraries

Hi,

I am using Eclipse C++ on Windows with MinGW for linkage. Can you tell
me why the libraries used by MinGW (in the \MinGW\lib directory) have
a .a extension, wich is unix library extension? I thought that MinGW
would use .lib libraries.

Thank you.

Oct 6 '07 #1
6 5108
John wrote:
Hi,

I am using Eclipse C++ on Windows with MinGW for linkage. Can you tell
me why the libraries used by MinGW (in the \MinGW\lib directory) have
a .a extension, wich is unix library extension? I thought that MinGW
would use .lib libraries.

Thank you.
No, but you could probably find out in either gnu.g++.help or an Eclipse
newsgroup or mailing list.

What was your C++ language question?
Oct 6 '07 #2
On 2007-10-06 18:08, John wrote:
Hi,

I am using Eclipse C++ on Windows with MinGW for linkage. Can you tell
me why the libraries used by MinGW (in the \MinGW\lib directory) have
a .a extension, wich is unix library extension? I thought that MinGW
would use .lib libraries.
Because MinGW is trying hard to be UNIX running on tom of windows. For
further questions about MinGW please use a MinGW group/mailing list.

--
Erik Wikström
Oct 6 '07 #3

John wrote in message...
Hi,
I am using Eclipse C++ on Windows with MinGW for linkage. Can you tell
me why the libraries used by MinGW (in the \MinGW\lib directory) have
a .a extension, wich is unix library extension? I thought that MinGW
would use .lib libraries.
Thank you.
Could it be because a static library is a collection of object files,
sometimes called an "Archive"? The ".lib" extension is, AFAIK, a ms thing. I
have changed the '.lib' extension to '.a' on a few third-party libraries,
and it worked fine with GCC(MinGW).

--
Bob R
POVrookie
Oct 9 '07 #4

John wrote in message...
Hi,
I am using Eclipse C++ on Windows with MinGW for linkage. Can you tell
me why the libraries used by MinGW (in the \MinGW\lib directory) have
a .a extension, wich is unix library extension? I thought that MinGW
would use .lib libraries.
Thank you.
Could it be because a static library is a collection of object files,
sometimes called an "Archive"? The ".lib" extension is, AFAIK, a ms thing. I
have changed the '.lib' extension to '.a' on a few third-party libraries,
and it worked fine with GCC(MinGW).

--
Bob R
POVrookie
Oct 9 '07 #5
On Oct 9, 3:00 am, "BobR" <removeBadB...@worldnet.att.netwrote:
John wrote in message...
I am using Eclipse C++ on Windows with MinGW for linkage. Can you tell
me why the libraries used by MinGW (in the \MinGW\lib directory) have
a .a extension, wich is unix library extension? I thought that MinGW
would use .lib libraries.
Thank you.
Could it be because a static library is a collection of object files,
It's more than that.
sometimes called an "Archive"?
And an archive can have other types of files in it.
The ".lib" extension is, AFAIK, a ms thing.
I think it's pretty universal. I've seen it on a lot of
systems. Unix doesn't use it, simply because Unix doesn't have
real library files; in the older versions of Unix, a "library"
was an archive with a special first entry, created by ranlib.
(I'm not sure that the traditional differences are very
important today, but back when machines where a lot slower,
having a random index could make linking a lot faster.)
I have changed the '.lib' extension to '.a' on a few
third-party libraries, and it worked fine with GCC(MinGW).
I'm pretty sure that g++ under Windows can understand .lib
files, as well as Unix-like .a files. (For that matter, the
files generated by CygWin's ar look very much like the files
generated by Microsoft's lib.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Oct 9 '07 #6
Alf P. Steinbach wrote:
* James Kanze:
I'm pretty sure that g++ under Windows can understand .lib
files, as well as Unix-like .a files. (For that matter, the
files generated by CygWin's ar look very much like the files
generated by Microsoft's lib.)
AFAIK they're COFF format all, so to a limited extent yes.
The object files are COFF. I don't think COFF or ELF say
anything about the format of a library file. But Microsoft
seems to have adopted something very much like the Unix format.
However there's name mangling and calling conventions and and
and.
So the compatibility is more of a theoretical issue, really.
Not necessarily. The C-API is well defined, and you might want
to link against third party libraries using it.

--
James Kanze (GABI Software) mailto:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Oct 10 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andrew Gregory | last post by:
In Python 2.2, I compiled some C++ code on Windows (MinGW compiler) to create an extension using distutils and the following setup.py file: from distutils.core import setup, Extension setup...
188
by: Ilias Lazaridis | last post by:
I'm a newcomer to python: - E01: The Java Failure - May Python Helps? http://groups-beta.google.com/group/comp.lang.python/msg/75f0c5c35374f553 - I've download (as suggested) the python...
6
by: Ernesto | last post by:
Hi everybody: I do not know if this is the right newsgroup for my issue, but I think that someone here knows about this issue: I am developing a set of libraries in C++ and I want to export my...
4
by: Harald Mossige | last post by:
Dev-Cpp "dont se" MinGW. (Win2K) I have downloaded and run: devlup4991nomingw_setup.exe and MinGW-3.1.0-1.exe in those dirrectory:
66
by: Srijit Kumar Bhadra | last post by:
Is there any specific reason for not using MinGW to build the official distribution of Python for Win32? A quick Google search did not reveal the answer to my question. If a link is available,...
39
by: Jim Showalter | last post by:
Does a hosted implementation require any particular libraries in order to be considered a standard C compiler? -- _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ _/...
3
by: mislavb | last post by:
Can Dev-Cpp (Mingw) (under windows) compile network libraries: #include <unistd.h> #include <arpa/inet.h> #include <sys/types.h> #include <netinet/in.h> #include <sys/socket.h> and if yes,...
37
by: Vince C. | last post by:
Hi all. I've installed Bloodshed Dev-C++ on a Windows 2000 SP4 machine. I'm using MinGW 3.4.2. I'd like to temporarily disable standard functions to write to stderr, i.e. for instance...
14
by: L. Lindstrom | last post by:
I have read that Python extension modules must link to the same C run-time as the Python interpreter. This I can appreciate. But does this requirement extend to the C libraries an extension module...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.