RE: multiply defined functions in libs

"Jamie Fowlston" <[email protected]>
Newsgroups gmane.games.devel.general
Message-ID <[email protected]>
Don't think there's a single consistent way to do it cross-platform, but
generally there's a way to substitute symbols for other symbols, etc., at
link time. In gcc, you're after the defsym related functionality of ld
(iirc), and i'm pretty sure i remember seeing something similar in the MS
visual C++ stuff.

Sorry i'm a bit vague, not something i've ever actually had to use :)

Jamie


-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of
Brett Bibby
Sent: 09 June 2004 04:58
To: [email protected]
Subject: [GD-General] multiply defined functions in libs


I have no idea where to ask this quesiton, so I guess general might be okay.

Recently I have switched our memory management to Doug Lea's malloc and so
far so good.  The biggest problem is that I'm trying to drop in and replace
the normal ansi calls.  This generally works although with different side
effects on different platforms.  For example, CodeWarrior's linker emits a
warning that multiple "malloc" symbols are defined on Win32, but correctly
chooses to use mine anyway if I set the link order correctly, and emits no
warnings at all on PS2 and GCN and seems to use mine silently (although the
original malloc is listed in the linker map, just unused!).  On MSVC it is
an error and won't build the Win32 version.  Since we have 18 target builds
across mutliple platforms this is messy.  I can't remove the offending
libraries without also removing a bunch of needed functions as they are
built into a single library.

Is there any sort of pragma or some other way to make sure that all
references to memory management functions only see my definition?  It seems
that many people must have done this before....

If not, the only way I see to fix this properly is to build custom release
and debug libs from each platform's source and exclude the functions I want
to remove <shudder>.

Brett



-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.668 / Virus Database: 430 - Release Date: 24/04/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.668 / Virus Database: 430 - Release Date: 24/04/2004



-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=557
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.