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 Message-ID: <3F2A2543.9060404@sanger.ac.uk> Date: Fri, 01 Aug 2003 09:30:59 +0100 From: Rob Clack Organization: Sanger Institute User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030326 X-Accept-Language: en-us, en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: #define question Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Having just updated to cygwin 1.3.22-1 I'm now building my application and have a wierdness I hope someone can help with. Deep in the nether regions of the code, I use IMalloc_Free which is a macro now defined in objidl.h. I think in earlier versions of cygwin it was somewhere else. In objidl.h, it's protected by an ifdef, so it looks like this: #ifdef COBJMACROS / some stuff / #define IMalloc_Free(This, pv) (This)->lpVtbl->Free(This,pv) In my code, I have this: #define COBJMACROS #include Compiling, I get no errors until the link phase, at which point it complains that IMalloc_Free is undefined and points me at the lines in my code where I actually use the macro. ie, either objidl.h isn't getting included at all, though I get no error there, or the macro isn't getting #defined, or it's getting undefined somewhere. I've looked really hard for daft spelling errors and all that, without success. Compiling with -E seems to show that it's just not getting done, though I fess I find the preprocessor output confusing, so I may be wrong on that one. However, it _looks_ as though it's just not getting done by objidl.h, but that doesn't make sense either. My temporary fix is to manually #define the macro immediately before I use it, but that's not really satisfactory, of course. Anyone got any idea what's going on here? Thanks Rob -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Just self-replicating, compartmentalised, redox chemistry, really. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rob Clack Acedb Development, Informatics Group email: rnc AT sanger DOT ac DOT uk Wellcome Trust Sanger Institute Tel: +44 1223 494780 Wellcome Trust Genome Campus Fax: +44 1223 494919 Hinxton Cambridge CB10 1SA -- 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/