converting .a linux libraries to windows Visual .lib libraries

Posted on 2003-03-26
Medium Priority
Last Modified: 2012-06-21
I'm trying to use a toolbox developped for linux on Visual C++ 6.
I mad many changes that work exept for the libraries that must be linked:
the toolbox as .a libraries with the associated makefiles.
How can I simply recompile these libraries to get .lib files that I will be able to use on windows ???
thanks a lot !

Question by:dsalle
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

burcarpat earned 152 total points
ID: 8209825
if you have the original sources, you'll need to create library projects for them under msvc6.  if not, then you'll have a lot of problems making msvc6 read those, although i heard about some tools that does such conversions...

LVL 12

Assisted Solution

Salte earned 148 total points
ID: 8209879
The .a format for libraries is NOT the same as the .LIB format. To make matters worse, the .a format is a library of .o files and .LIB is a library of .OBJ files and they too have different formats.

So, as burcarpat says, the best option is to simply make a .LIB project in MSVC and then compile the .LIB files from there using the source files. This will compile the .OBJ files and make .LIB out of them.

You may get a conversion tool that convert a .a to .LIB but I don't know of the quality of any such tool and I won't recommend any.

If you don't have the source code for the library you're essentially out of luck. However, if it is a Linux library the source is usually available somewhere if you just look around on the net :-)


Expert Comment

ID: 8209884
download cygwin or other unix pc emulator. It can make the lib and you can use it from there in the cygwin package. Theses libs probably wont work with msvc, but you if all you want is to run a program...


Expert Comment

ID: 9550787
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split points between Salte & burcarpat

Please leave any comments here within the next seven days.


EE Cleanup Volunteer

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question