This question is for is for experts
I'll explain my 5 procedures, and after my question.
1) With my friend, we have coded an PE loader in C++ with GPP, and we can use this with FreeBasic for dos this work! :)
And we want to execute simple Win32 console application, so I've used HX-Extender library by Japthet for complet all win32 missing functions.
So we use Japthet DPMILD32, (HX-Extender) library. Source : https://sourceforge.net/projects/hx-dos/files/
2) I've extracted the .LIB file content for getting lot of .OBJ files. So with this .OBJ files, I've include in a new archive library .A
And i've include this .A library file in my C++/FreeBasic program compilation.Bla bla bla bla..... Brief, So it's always good!
3) When I want to use a Win32 function (EnterCriticalSection function) natively on my C++ code for test, and compile this, I've this :
4) So, in my C++ code I tested to declare :
Code: Select all
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
Code: Select all
extern void WINAPI EnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection);
5) When I read the symbol on my "MemoryModule.OBJ", with CFF Explorer software :
I've my Win32 function that I want use here, so OK!
But my (i think) my declaration symbol generated is not the same...
My question:
How to resolve this problem for have exactly "EnterCriticalSection" and NOT "__Z20EnterCriticalSectionP21_RTL_CRITICAL_SECTION" ?? This caused by the C++ name mangling ?
ps: "MemoryModule.OBJ" is compiled with GPP/DJGPP
Regards
Sébastien FAVIER