How to cross-compile DLL with exported functions How to cross-compile DLL with exported functions linux linux

How to cross-compile DLL with exported functions


Pragmas are specific to each compiler, your pragmas will work in Visual C++, but not in MingW. Instead you can use a .def file which are supported by Visual C++ and MinGW.

Here's what injector.def might look like in your case:

EXPORTS    CheckEvenOdd = GetEvenOdd.dll.original.CheckEvenOdd    PrintAMessage = GetEvenOdd.dll.original.PrintAMessage

Compilation command:

$ i686-w64-mingw32-g++ -o GetEvenOdd.dll --shared injector.cpp injector.def