SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.

The Southern California OS/2 User Group
USA

SCOUG-Programming Mailing List Archives

Return to [ 10 | September | 2005 ]

<< Previous Message << >> Next Message >>


Date: Sat, 10 Sep 2005 09:35:31 PDT7
From: "Steven Levine" <steve53@earthlink.net >
Reply-To: scoug-programming@scoug.com
To: scoug-programming@scoug.com
Subject: SCOUG-Programming: OS/2 Toolkit Programming and Watcom

In <20050910081046-51631-9@scoug.com>, on 09/10/05
at 08:10 AM, "Harry Motin" said:

Hi Harry,

This is a bit complicated.

> _wpQueryProgDetails(Self, pProgDetails, &ulSize)

> _wpAllocMem(Self, ulSize, NULL)

These are not Toolkit functions. These are effectively macros, that get
resolved at compile time to call the correct class or instance method
based on the static SOM class hierarchy. This hierarchy is defined in the
interface description language (idl) file for the class definition.
Runtime class replacements may alter the method that is finally called,
but this is transparent to your code.

>When I make all of the *.c and *.h files, I get a compiler error that
>states that I have two undefined references, as follows:

> _wpQueryProgDetails_

It will not solve your problem but you need to understand that different
compilers use different calling conventions. The Watcom default is a
register based calling convention that suffixes external names with an
underscore. The VAC default is a register based convention that applies
no prefix or suffix characters The Microsoft C default is stack based and
prefixes external names with an underscore. Note that the underscore
prefix in your example is none of the above. It is just part of the macro
name.

To make code built with different tools interoperate, you need to use
modifiers such as cdecl and system in the function declarations so that
the compiler can generate the correct calling convention code. If you
look at the toolkit headers, you will see how this is done.

>Can anyone help me with this. Thanks for any information.

Since you never supplied snippets of the failing code or stated any goal
beyond getting a clean build of your code, I have to guess you are trying
to use WPS code in a PM application. That will not work. To proceed
further, you are going to have to explain what you are really trying to
do.

If you really want to do WPS programming, take a look at the WPS sample
code in the Toolkit. Reading about "Creating SOM Classes" in the WPS
Programming Guide will also be helpful.

Regards,

Steven

--
----------------------------------------------------------------------
"Steven Levine" MR2/ICE 2.67 #10183 Warp4.something/14.100c_W4
www.scoug.com irc.fyrelizard.com #scoug (Wed 7pm PST)
----------------------------------------------------------------------

=====================================================

To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".

For problems, contact the list owner at
"postmaster@scoug.com".

=====================================================


<< Previous Message << >> Next Message >>

Return to [ 10 | September | 2005 ]



The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA

Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.