Subject: Re: Microsoft Foundation Classes
From: [email-masked] (David Fox)

23 Aug 1997 01:26:40 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]> <[email-masked]>
Original-To: [email-masked]
In-Reply-To: Eric Britten's message of Mon, 18 Aug 1997 11:26:21 -0700
X-Mailer: Gnus v5.3/Emacs 19.34
Original-Sender: [email-masked]

Eric Britten <[email-masked]> writes:

> > Is it possible to use MFC 4.1 using gnu-win32?  If so, how?
> 
> You need the source because VC++ and Borland C++ use a different name
> mangling conventions.  If you can get the source to compile, you can
> then create static and dynamic link MFC libraries.  DLLs with GCC are
> hard to create, I have had little luck with them.

How about using GCC's "ASM labels" mechanism to make inline functions
that invoke the MFC procedures?  Is the calling convention compatible?

] Controlling Names Used in Assembler Code
] ========================================
] 
]    You can specify the name to be used in the assembler code for a C
] function or variable by writing the `asm' (or `__asm__') keyword after
] the declarator as follows:
] 
]      int foo asm ("myfoo") = 2;
] 
] This specifies that the name to be used for the variable `foo' in the
] assembler code should be `myfoo' rather than the usual `_foo'.
] 
]    On systems where an underscore is normally prepended to the name of
] a C function or variable, this feature allows you to define names for
] the linker that do not start with an underscore.
] 
]    You cannot use `asm' in this way in a function *definition*; but you
] can get the same effect by writing a declaration for the function
] before its definition and putting `asm' there, like this:
] 
]      extern func () asm ("FUNC");
]      
]      func (x, y)
]           int x, y;
]      ...
] 
]    It is up to you to make sure that the assembler names you choose do
] not conflict with any other assembler symbols.  Also, you must not use a
] register name; that would produce completely invalid assembler code.
] GNU CC does not as yet have the ability to store static variables in
] registers.  Perhaps that will be added.

-- 
David Fox            http://www.cat.nyu.edu/fox            xoF divaD
NYU Media Research Lab     [email-masked]    baL hcraeseR aideM UYN
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".