From: fox AT cat DOT nyu DOT edu (David Fox) Subject: Re: Microsoft Foundation Classes 23 Aug 1997 01:26:40 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: References: <33F893CD DOT 13056BBE AT uci DOT edu> Original-To: gnu-win32 AT cygnus DOT com 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: owner-gnu-win32 AT cygnus DOT com Eric Britten 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 fox AT cat DOT nyu DOT edu baL hcraeseR aideM UYN - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".