Today I fixed a bug where I had to link a g++ program to a 64-bit .lib made with 💩Visual Studio💩. It turns out if you put __declspec(dllimport) in the headers, instead of __fastcall, it magically works.