Using a static MSVC 2010 libary (.lib) with MinGW? -


Because some WIN32 related things did not work much in using minidized, I had a small static library with MSVC 2010 Decided to make and link it to Minugu later, however, I am currently looking for a tool which allows me to convert static MSVC Library (.lib) to MinjiWattical Libraries (.a). While searching the web, I find many tools for "to to to toe", in which for some reason. Dll file is required, so I thought it was not quite what I was looking for.

The library has been compiled in C and the use of MSVC works perfectly. This header file is:

  #ifndef _GWSI_H #define _GWSI_H #include & lt; Windows.h & gt; #define GWSI_HEIGHT 0x0001 # defined GWSI_WIDTH 0x0002 # defined GWSI_OSVI_MAJOR 0x0010 # defined GWSI_OSVI_MINOR 0x0011 # defined GWSI_OSVI_BUILD 0x0012 #ifdef __cplusplus extern "C" {#endif float GWSI_getCpuSpeed ​​(); Int GWSI_getOSV (unsigned induct flag); Int GWSI_getScreenResolution (unsigned Induct Flag); Unsigned _int64 GWSI_getTotalSystemMemory (); #ifdef __cplusplus} #endif #endif/ * _GWSI_H * /   

Just try to link .lib, this one. A, (not with Mingu and VisualStudio with netguns), of course, the cause of this error:

  GWSI.h: 26: 17: Error: Expected Starter before GWSI.h: 26: 17: Error: Expected Starter before 'GWSI_getTotalSystemMemory'   

'GWSI_getTotalSystemMemory ();' After removal; Prototype I found this error, which means that the link was not linked to the Library:

  main.o: main.cpp :(. Text + 0xf): `GWSI_getCpuSpeed Undefined reference to '  

Did you know how can I achieve my goal, to use this static library with Minugu? Also, what could be the reason for the first error? I do not see any real recession.

Thank you for your help!

I believe that you can not link libraries compiled in your Minu code in MSVC.

Comments