• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1274
  • Last Modified:

converting .a linux libraries to windows Visual .lib libraries

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 !

0
dsalle
Asked:
dsalle
2 Solutions
 
burcarpatCommented:
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...

-b
0
 
SalteCommented:
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 :-)

Alf
0
 
jonninCommented:
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...

0
 
tinchosCommented:
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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now