I'm writting an application which executables are written in VB and Delphi, but DLL's (for performace reasons) are written in C++...since today I was using VC++ where creating DLL's with __stdcall functions was very easy (I just had to attach .def file)...
In devc++ it seems impossible to export functions as __stdcall...
I tried to add --export-all-symbols to compiler command line but resulting dll contains functions which names differ from source names (compiler or linker adds __Fllll and so on type describing characters)...it's not so big problem(i can still refer to them in VB by their INDEXes) but they seem's to be NOT __stdcall (application crashes after about 3 calls)...
I tried also to add --def listofproceduresforexport.def but in that case linker cannot resolve function names (I think he's more stupid than vc++ linker which had no problem whit that) becouse their names were changed by compiler or linker by adding this f**in __flll tags....
in both cases compiler seems to be blind and don't understand my __stdcall in front of all my functions...
Question1. How to protect names of functions to be not changed if it's not nesessary (it is only when there is function overload)
Question2. How to ensure that all functions in DLL (and also CALLBACKs!) will follow __stdcall convention?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm writting an application which executables are written in VB and Delphi, but DLL's (for performace reasons) are written in C++...since today I was using VC++ where creating DLL's with __stdcall functions was very easy (I just had to attach .def file)...
In devc++ it seems impossible to export functions as __stdcall...
I tried to add --export-all-symbols to compiler command line but resulting dll contains functions which names differ from source names (compiler or linker adds __Fllll and so on type describing characters)...it's not so big problem(i can still refer to them in VB by their INDEXes) but they seem's to be NOT __stdcall (application crashes after about 3 calls)...
I tried also to add --def listofproceduresforexport.def but in that case linker cannot resolve function names (I think he's more stupid than vc++ linker which had no problem whit that) becouse their names were changed by compiler or linker by adding this f**in __flll tags....
in both cases compiler seems to be blind and don't understand my __stdcall in front of all my functions...
Question1. How to protect names of functions to be not changed if it's not nesessary (it is only when there is function overload)
Question2. How to ensure that all functions in DLL (and also CALLBACKs!) will follow __stdcall convention?
The mingw-users forum is full of this topic, give google a try.
Well, not google, geocrawler.
http://www.geocrawler.com/lists/3/SourceForge/6013/0/