Simon
Simon

Reputation: 1

Use Windows MinGW .a library under Linux

I have a library which has been created under Windows with MinGW. The .a library contains some .o files. Now I want to use this library under Linux. If I try to link the library to my program I get some undefined references to functions in this library. Under windwos however there aren't any problems. Is it possible to "convert" a windows MinGW .a library to Linux?

Upvotes: 0

Views: 595

Answers (2)

rsnagaraj6in
rsnagaraj6in

Reputation: 45

MinGW is meant to be for windows platform. If you want to run for linux, compile the code with gnome compilers like gcc

Upvotes: 0

OrangeDog
OrangeDog

Reputation: 38759

It will have been compiled to use Windows OS functions, so will not work on other platforms.

You could try linking it with WINE (a Windows API adaptor for Linux) but the simplest solution is to just recompile the library on your target platform if you have access to the source code.

Upvotes: 2

Related Questions