help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: g++ free function conflict


From: Paul Pluzhnikov
Subject: Re: g++ free function conflict
Date: 02 Aug 2004 21:49:30 -0700
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

bluedoze@yahoo.com (BlueDoze) writes:

[Please do not top-post].

> I mean I have to include this file as is, and I don't have any other choice.

Ok, one of 2 things is happening:
- either the library you are using really *defines* 'free()' as
  you stated in your original message; or
- the library doesn't really define free(), but has a header file
  with incorrect 'free()' prototype.

If the former, you need to seek advice from a guru, as the problem
and solutions could be very non-trivial.

If the latter (which is much more likely the case), you should
contact library provider to notify him of the bug in his header,
and fix the header to either remove the bogus prototype alltogether,
or to make it agree with the one in /usr/include/malloc.h

To find out which, run 'nm libfoo.* | grep " free$"' (where libfoo
is the library you depend on). If you see this:

  00074900 W free        or
  00074900 T free

then you have the 'library really does define free' case.
If, OTOH, you see this:

           U free         or
           w free

then you have the 'bogus prototype' case.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]