[reSIProcate] "Undefined symbols" on Mac OS X 10.4.8
Byron Campen
bcampen at estacado.net
Wed Feb 21 10:28:21 CST 2007
A const Foo& is a reference to a const Foo. ie, you cannot "change"
the Foo. However, you _are_ allowed to point the reference at some
other Foo, if you like. A Foo const& is a const reference to a non-
const Foo; ie, you are allowed to do whatever you want with the Foo,
but you are not allowed to point the reference at some other Foo. It
appears you have somehow passed the latter of these two types,
instead of the former. The compiler will complain about this, because
the contract in the function does not promise to leave the reference
to said vector alone. Now, why it is waiting until link-time to
complain about this, I do not know. (this should be something it
catches at compile-time) What version of gcc are you using?
Best regards,
Byron Campen
> Hello!
> Here is some more info...
> I instantiate SipStack object without parameters, so the
> constructor is
> called with its default parameters. I tried to instantiate the object
> with two bogus parameters:
>
> SipStack mSipStack( 0, 0 );
>
> The compiler complained immediately:
>
> error: no matching function for call to 'resip::SipStack::SipStack
> (int,
> int)'
> SipStack.hxx:462: note: candidates are: resip::SipStack::SipStack
> (const
> resip::SipStack&)
> SipStack.hxx:52: note:
> resip::SipStack::SipStack(resip::Security*, const
> std::vector<resip::GenericIPAddress,
> std::allocator<resip::GenericIPAddress> >&,
> resip::AsyncProcessHandler*,
> bool, void (*)(resip::Socket, int, const char*, int))
>
> I built again without parameters. Compilation completed successfully,
> but linker complains:
>
> /usr/bin/ld: Undefined symbols:
> resip::SipStack::SipStack(resip::Security*,
> std::vector<resip::GenericIPAddress,
> std::allocator<resip::GenericIPAddress> > const&,
> resip::AsyncProcessHandler*, bool, void (*)(int, int, char const*,
> int))
>
> What frustrated me was:
>
> ************************************************************
> --- In compiler's suggestion second parameter is:
> const std::vector<resip::GenericIPAddress,
> std::allocator<resip::GenericIPAddress> >&
> =============================================
> --- In linker's "undefined symbol" second parameter is
> std::vector<resip::GenericIPAddress,
> std::allocator<resip::GenericIPAddress> > const&
> ************************************************************
>
> Why in linker's suggestion the *const* is at the end of type
> required??
> What is wrong?
> Thanks in advance!
>
> Best regards,
> Petyo Milotinov
>
>
>
> Petyo Milotinov wrote:
>> Hello!
>> I develop a softphone using resiprocate. The phone builds on
>> Linux and
>> Windows without problems. But on Mac OS X 10.4.8 (Intel) I receive:
>>
>> /usr/bin/ld: Undefined symbols:
>> resip::SipStack::SipStack(resip::Security*,
>> std::vector<resip::GenericIPAddress,
>> std::allocator<resip::GenericIPAddress> > const&,
>> resip::AsyncProcessHandler*, bool, void (*)(int, int, char const*,
>> int))
>> collect2: ld returned 1 exit status
>> make: *** [idefisk2] Error 1
>>
>> I'm using SVN version of resiprocate, revision 6946.
>> Where am I wrong?
>> Thanks in advance!
>>
>> Best regards,
>> Petyo Milotinov
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at list.resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at list.resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2423 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20070221/44a37509/attachment.bin>
More information about the resiprocate-devel
mailing list