C++ :: MinGW And Export Link Libs?
Jan 5, 2012I'm building an app using VC++. The app links to a DLL built using TDM-GCC (which uses MinGW I think). Obviously, the DLL comes with a link lib.
If the lib is linked to another MinGW app, the DLL functions get found by name. So if the DLL builder updates his DLL, the MinGW app carries on working.
However, if the same lib is linked to a VC++ app, the functions get found by ordinal value. But MinGW doesn't seem to have any means of guaranteeing that a later build of the DLL will use the same numbering scheme. So his new DLL will break the pre-existing VC++ app that used it.
In VC++ this problem could be solved by using a DEF file but that doesn't seem to work in MinGW. So my question is:- can a DLL built with MinGW be somehow instructed to export its functions only by name - or at least to export them so that any other compiler will import them by name and not by ordinal numbers?