This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C COM objects?

I tried a couple of times to get ZooLib ( to build with Cygwin. ZooLib is a cross-platform application framework, and on Windows uses COM to handle the clipboard and drag and drop.

I believe that actually you CAN get COM to work with gcc, even from C++, but you're going to need to build gcc and its libraries a different way than the way it's normally built by the Cygwin developers. I'm afraid I don't remember what is needed, but it has something to do with vtable thunking. You need to set whatever option deals with that differently than the way it's built normally by the cygwin folks.

I'm sorry I can't be more specific, but it's been a while. Maybe if you search for my email address or the word "zoolib" in the list archives you can find where I asked about this before.

It's actually not very hard at all to do COM programming in C. A COM interface is little more than a structure full of pointers to functions. I have some sample code from when I gave a talk on writing Mac OS X user clients at MacHack last year. Yes, Apple's Mac OS X actually uses COM! Who would have thought. I've been meaning for months to post the source on my website but I got to fix it up before I do. I'll go have a look and maybe I can post some snippets as a reply to this thread.

Michael D. Crawford
GoingWare Inc. - Expert Software Development and Consulting

Tilting at Windmills for a Better Tomorrow.

    "I give you this one rule of conduct. Do what you will, but speak
     out always. Be shunned, be hated, be ridiculed, be scared,
     be in doubt, but don't be gagged."
     -- John J. Chapman, "Make a Bonfire of Your Reputations"

-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]