no matching function
Roger Collins
roger@ProProject.com
Sat Feb 10 15:48:00 GMT 2001
ÃÂ
I'm trying to build
PWLIB of OpenH323 using gcc 3.0 and would like help interpreting an error
message.ÃÂ Here's the message:
ÃÂ
In file
included from
/elmer/elmer16/rcollins/pwlib/include/ptlib/unix/ptlib/svcproc.h:63, ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
from
/elmer/elmer16/rcollins/pwlib/include/ptclib/httpsvc.h:133 , ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
from
../../ptclib/httpsvc.cxx:219: /elmer/elmer16/rcollins/pwlib/include/ptlib/svcproc.h:
In constructor ÃÂ ÃÂ
`PSystemLog::PSystemLog(PSystemLog::Level)': /elmer/elmer16/rcollins/pwlib/include/ptlib/svcproc.h:139:
no matching function ÃÂ ÃÂ for call to `std::basic_iostream<char,
std::char_traits<char> ÃÂ ÃÂ
>::basic_iostream()' /elmer/elmer4/rcollins/gcc3/dist/include/g++-v3/bits/std_iosfwd.h:65:
candidates ÃÂ ÃÂ are: std::basic_iostream<char,
std::char_traits<char> ÃÂ ÃÂ >::basic_iostream(const
<anonymous>**, const std::basic_iostream<char, ÃÂ ÃÂ
std::char_traits<char>
>&) /elmer/elmer4/rcollins/gcc3/dist/include/g++-v3/bits/std_istream.h:278: ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
std::basic_iostream<_CharT, ÃÂ ÃÂ
_Traits>::basic_iostream(std::basic_streambuf<_CharT, _Traits>*)
[with ÃÂ ÃÂ _CharT = char, _Traits =
std::char_traits<char>] make[1]: ***
[/elmer/elmer16/rcollins/pwlib/lib/obj_unixware_x86_r/httpsvc.o] Error
1
ÃÂ
The message below
tells me there is no matching function for call to the default constructor of
basic_iostream.
ÃÂ
The function being
compiled is a constructor of PSystemLog, which is derived from iostream (a
template defing the basic_iostream class).
ÃÂ
The base class constructor gets called
automatically.ÃÂ Does the language try to find one that matches the derived
class constructor signature?ÃÂ Or does it just use the default
constructor?ÃÂ Anyway, this explains why there is a call (implied) to the
default constructor of basic_iostream.
ÃÂ
If a default constructor isn't defined,
doesn't it get created automatically?ÃÂ Does a default basic_iostream make
any sense?ÃÂ Has it been explicitly defined private to prevent its
use?
ÃÂ
Am I missing an obvious fix?
ÃÂ
Roger
ÃÂ --
Roger Collins
ProProject, Inc.
www.ProProject.com --ÃÂ M anage time,ÃÂ expenses, and
billing on projects
ÃÂ
More information about the Gcc
mailing list