Pelles C forum

Pelles C => Bug reports => Topic started by: frankie on June 08, 2006, 02:15:58 PM

Title: ebx register not saved when otimization is on.
Post by: frankie on June 08, 2006, 02:15:58 PM
Sorry no bug! :oops:

I found the problem!
I used the projects to compile sqlite3 static library  from the samples section of this site. The library have been compiled with _cdecl calling convention (as defined in the project).
Then I made a sample program in console mode, in this modality the program have been compiled also in _cdecl by default, so everything worked well.
When I started to write a GUI program the convention changed to _stdcall by default. In this case I had a calling convention mismatch!
The big problem is that the header file doesn't specify the calling convention :twisted: .
Much more if someone compiles the objects in the same directories and tries to build the static lib, the static multithread library and the DLL will have a lot of surprises!!! :evil:  (a DLL with modules in _cdecl format or static libraries in _stdcall).
What a mess linking them between GUI and console programs......  :?