Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Reply-To: From: "Rafael Kitover" To: Subject: RE: C COM objects? Date: Thu, 29 Jan 2004 20:25:07 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <4019B367.8070906@goingware.com> Message-Id: X-IsSubscribed: yes Hi Michael, I remembered your sig from a Slashdot article :) If COM and OLE are similar beasties, I think you mean -fvtable-thunks. GCC 2.95 required -fvtable-thunks to build OLE stuff, like the Win32::OLE module in the perl-libwin32 package, but since GCC 3.x it works fine as it is, and that option no longer exists. It seems most of the OLE/COM stuff should work more or less fine in Cygwin with a bit of tweaking. Now, if only we could get a Cygwin version of tchar.h... I guess I could write one :) -- Rafael >-----Original Message----- >From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of >Michael D. Crawford >Sent: Thursday, January 29, 2004 5:29 PM >To: cygwin AT cygwin DOT com >Subject: Re: C COM objects? > >I tried a couple of times to get ZooLib (http://www.zoolib.org/) 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. > >Mike >-- >Michael D. Crawford >GoingWare Inc. - Expert Software Development and Consulting >http://www.goingware.com >crawford AT goingware DOT com > > 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" > http://www.goingware.com/reputation/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/