Hello,
On 2017-02-19 18:31, Bart Smissaert wrote:
gcc -o SQLite3_StdCall.dll -shared sqlite3.c -s -Wl,--subsystem,windows,--
kill-at
objdump of SQLite3_StdCall.dll sqlite3_close:
6574f392: 55 push %ebp
6574f393: 89 e5 mov %esp,%ebp
6574f395: 83 ec 18 sub $0x18,%esp
6574f398: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
6574f39f: 00
6574f3a0: 8b 45 08 mov 0x8(%ebp),%eax
6574f3a3: 89 04 24 mov %eax,(%esp)
6574f3a6: e8 ed fe ff ff call 0x6574f298
6574f3ab: c9 leave
6574f3ac: c3 ret
Hopefully GCC is not as clever as CL, in particular it is not wiser then
a programmer, who is using it. Thus, it emits 0xC3 instead of 0xC2,
until you will tell it that you want __stdcall. Still, you have C
calling convention -- not stdcall one. If you do not want to make CL
working, I strongly recommend you to stop playing with GCC and to use
other compiler, for example Open Watcom (1.9 or 2.0):
wcl386 -dSQLITE_CDECL=__cdecl -ecd -bd -bm -l=NT_DLL sqlite3.c
-- best regards
Cezary H. Noweta
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users