gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] OpenCobol (Windows) and DB2


From: Franklin Ankum
Subject: Re: [open-cobol-list] OpenCobol (Windows) and DB2
Date: Mon, 7 Aug 2006 10:03:07 +0200

Hi Frank,

Has anyone attempted, or better yet had success, with compiling any of
the DB2 LUW v8.2 samples using Sergey's OpenCOBOL Windows binaries?
From what I can tell the DB2 API functions must be called using the
__stdcall calling convention, while OpenCOBOL is built using the __cdecl
calling convention.  Is there any way I can force the sqlapi calls to
use __stdcall while keeping all of the others as __cdecl?

Yes, i also had this problem!
I did i dirty trick to make these calls work:
By changing every call to "sqlg????" in the DB2 Precompiled output to "sqla????"
These are the API Calls for C-Programs.

I did many test and everything seems to work fine, although i'm not really pleased about this aproach. We could ask IBM for an Enhancement of the Preprocessor to accept the Target "OPENCOBOL"

Sergey's comment to this was:
OC will not work with stdcall and if stupid DB2 has only stdcall library than it might be only choice to create (take from DB2) some db2.h header file which will define those functions as stdcall, and simply add the inclusion of this header to the libcob.h
That should resolve the issue.


Regards,
Franklin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]