Use Windows MinGW .a library under Linux
I have a library which has been created under Windows with MinGW. The .a library contai开发者_运维技巧ns 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?
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.
MinGW is meant to be for windows platform. If you want to run for linux, compile the code with gnome compilers like gcc
精彩评论