public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Microsoft Foundation Classes
@ 1997-08-17 17:38 Matt Spong
  1997-08-18 21:16 ` Eric Britten
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Spong @ 1997-08-17 17:38 UTC (permalink / raw)
  To: gnu-win32

Is it possible to use MFC 4.1 using gnu-win32?  If so, how?



____________________________________________________________________
Get free e-mail and a permanent address at http://www.netaddress.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Microsoft Foundation Classes
  1997-08-17 17:38 Microsoft Foundation Classes Matt Spong
@ 1997-08-18 21:16 ` Eric Britten
  1997-08-20 14:12   ` David Fox
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Britten @ 1997-08-18 21:16 UTC (permalink / raw)
  To: gnu-win32

> Is it possible to use MFC 4.1 using gnu-win32?  If so, how?
>

If you can get the source and compile it, I would say yes.  I compiled
OWL 2.0 a few months ago and wrote a simple program that worked.  OWL is
a class library that is different from MFC, however I did cut out the
multithreaded functionallity.  OWL does not use any compiler specific
keywords.  You only need templates and exception handling.

As long as GCC supports all the syntax conventions of MFC you can
compile it.  I know is uses a special keyword called afx_msg; it is used
for window message handling.  I am not sure if there is a work around
for this keyword.  This is your biggest problem to overcome.

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.

> ____________________________________________________________________
> Get free e-mail and a permanent address at http://www.netaddress.com



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Microsoft Foundation Classes
  1997-08-18 21:16 ` Eric Britten
@ 1997-08-20 14:12   ` David Fox
  0 siblings, 0 replies; 4+ messages in thread
From: David Fox @ 1997-08-20 14:12 UTC (permalink / raw)
  To: gnu-win32

Eric Britten <ebritten@uci.edu> 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@cat.nyu.edu    baL hcraeseR aideM UYN
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Microsoft Foundation Classes
@ 1997-08-20 14:12 Guy Gascoigne - Piggford
  0 siblings, 0 replies; 4+ messages in thread
From: Guy Gascoigne - Piggford @ 1997-08-20 14:12 UTC (permalink / raw)
  To: gnu-win32

At 11:26 AM 8/18/97 -0700, Eric Britten wrote:
>As long as GCC supports all the syntax conventions of MFC you can
>compile it.  I know is uses a special keyword called afx_msg; it is used
>for window message handling.  I am not sure if there is a work around
>for this keyword.  This is your biggest problem to overcome.

Just in case you havn't found out, afx_msg isn't a keyword, it's defined in
afxwin.h and is simply used as a place holder for message handlers.

From the header file.

// Type modifier for message handlers
#ifndef afx_msg
#define afx_msg         // intentional placeholder
#endif

I havn't tried compiling this stuff with gcc though, I'd be interested in
knowing how it goes.

Guy

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-08-20 14:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-17 17:38 Microsoft Foundation Classes Matt Spong
1997-08-18 21:16 ` Eric Britten
1997-08-20 14:12   ` David Fox
1997-08-20 14:12 Guy Gascoigne - Piggford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).