W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2005

How to get around multiple 'MemAlloc' linkages?

From: Christopher Woods <cwoods_eol@yahoo.com>
Date: Mon, 14 Mar 2005 12:31:27 -0800 (PST)
Message-ID: <20050314203127.66582.qmail@web51802.mail.yahoo.com>
To: html-tidy@w3.org
(First attempted post seems to have vanished into the ether...)
Hi - I'm using the 10 March 2005 CVS codebase (latest) and I've run into an issue when adding Tidy to my project w/ MSVC6.0sp6 and static linking.  I'm getting:
error C2733: second C linkage of overloaded function 'MemAlloc' not allowed
error C2733: second C linkage of overloaded function 'MemFree' not allowed
messages from the compiler.  I have another 3rd Party DLL (a memory manager/debugger) that appears to declare/use MemAlloc and MemFree and since these are both using C linkages, there is a collision in the names.
I'm not quite sure of the best workaround/fix for this issue.
Can the Memory functions declared in platform.h be moved to another file (say maybe alloc.h or tidyalloc.h)?  Would there still be a name collision?
Or do I need to go through the Tidy Source replacing:
MemAlloc -> tidyMemAlloc
MemFree -> tidyMemFree
MemRealloc -> tidyMemRealloc (just to be consistent)
(I don't have the source for the other DLL so I can't do anything there.)
Thanks in advance,

-Christopher M. Woods
cwoods underscore eol at yahoo dot com
Do you Yahoo!?
 Yahoo! Mail - Easier than ever with enhanced search. Learn more.
Received on Tuesday, 15 March 2005 16:22:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:55 UTC