I need some instructions concerning function decoration! I always have problems with that stuff.
I have some code which should link with the statistical software R 3.1.0
There exists a DLL an import library and the header files.
In the code I have used the function 'Rf_initEmbeddedR' with cdecl as project option.
Polink searches for '_Rf_initEmbeddedR' regardless of which switch is set -Gm or -Gn
I have tryed to explore the DLL and the LIB with podump /EXPORT
In the DLL: 23C 23B 6C70C0A0 Rf_initEmbeddedR
In the LIB: R.dll: _Rf_initEmbeddedR (__Rf_initEmbeddedR)
So there are the following questions:
How is it possible to avoid any decoration?
Neither the first entry nor the second (in braces) of the LIB is matching with the entry in the DLL. Why?
Which, the first or the second, should match? Or in other words: which is the exported name, which the name in the DLL?
EDIT: I suppose that the import library and DLL is produced by/for mingw. What are the differences?