|
-
April 14th, 1999, 05:26 PM
#2
Re: C++ calling COBOL Procedures
I have never linked COBOL with C++, but the first thing that you should check is that the members of "struct g" are aligned the same way as COBOL would expect them. Remember that VC++ by default aligns members on an even boundary. If you need to convince yourself, what is the value of "sizeof(g)? I bet it isn't 12!
You need to specify that struct g is aligned on 1 byte boundaries. You can do this by using #pragma pack, or specifiying the byte alignment in the compiler settings.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|