Re: unresolved overloaded function type
- From: Chris Vine <chris cvine freeserve co uk>
- To: Jonathon Jongsma <jonathon quotidian org>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: unresolved overloaded function type
- Date: Fri, 11 Sep 2009 00:58:44 +0100
On Wed, 09 Sep 2009 16:01:31 -0500
Jonathon Jongsma <jonathon quotidian org> wrote:
> My guess is that one of your #includes pulls in another function that
> is also called kill(), and the compiler can't tell which one of those
> versions of kill() you want to bind to the signal. For instance, if
> I look in /usr/include, I find the following function definition
> in /usr/include/signal.h:
>
> extern int kill (__pid_t __pid, int __sig) __THROW;
>
> So one option is to rename your kill() function to something else.
> There may be a way to explicitly specify which overload you want, but
> I"m not sure what the syntax is. Somebody smarter than me will
> probably know though.
Your guess is almost certainly right.
You can't overload on POSIX kill() because it has a C linkage
specification (it doesn't do name mangling). The OP will have to change
the name of his user function. Generally, it is a very bad idea to give
user functions the same name as system calls, and fatal if they are
system calls with C linkage.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]