Link Errors with Latest Trunk Version.

11 views
Skip to first unread message

Sri

unread,
Jul 3, 2010, 8:45:11 AM7/3/10
to XMPPFramework
Hi All,

I am getting following error while trying to compile for iPhone
Simulator 4.0 with the latest trunk version.

I have followed the instruction listed in XMPPFramework wiki and still
unable to rectify the problem.

Pls review and let me know what could be the problem.

Undefined symbols:
"_kSRVResolverTarget", referenced from:
_kSRVResolverTarget$non_lazy_ptr in XMPPStream.o
(maybe you meant: _kSRVResolverTarget$non_lazy_ptr)
"_kSRVResolverPort", referenced from:
_kSRVResolverPort$non_lazy_ptr in XMPPStream.o
(maybe you meant: _kSRVResolverPort$non_lazy_ptr)
"_OBJC_CLASS_$_RFSRVResolver", referenced from:
objc-class-ref-to-RFSRVResolver in XMPPStream.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Thanks,
Srivatsan D

James Hays

unread,
Jul 3, 2010, 11:46:28 AM7/3/10
to xmppfr...@googlegroups.com
I had to add the libresolv.dylib framework.

> --
> You received this message because you are subscribed to the Google Groups "XMPPFramework" group.
> To post to this group, send email to xmppfr...@googlegroups.com.
> To unsubscribe from this group, send email to xmppframewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/xmppframework?hl=en.
>

Srivatsan

unread,
Jul 4, 2010, 10:49:23 AM7/4/10
to xmppfr...@googlegroups.com
Thanks you very much, Let me check and back to you.

Thanks,
Srivatsan D

Srivatsan

unread,
Jul 4, 2010, 4:33:38 PM7/4/10
to xmppfr...@googlegroups.com
Hello James Hays,

I have added the libresolv.dylib framework and still no luck. Getting
same errors, Can you please elaborate in detail how to rectify this
problem.

Thanks in advance.

Thanks,
Srivatsan D

Jon Hjelle

unread,
Jul 4, 2010, 7:46:23 PM7/4/10
to XMPPFramework
I attempted to add xmppframework to a new project today and had to add
the following to my project before it compiled without errors (in
addition to the files listed on the wiki):

XMPPModule (h, m)
RFSRVResolver (h, m)
libresolv.dylib framework (from /Developer/Platforms/iPhoneOS.platform/
Developer/SDKs/iPhoneOSX.Y.Z.sdk/usr/lib)

Reasons:
In revision r194 XMPPStream imports XMPPModule.
In revision r226, XMPPStream imports RFSRVResolver, which includes
dns_util, which is part of libresolv.dylib

Hope that helps,
Jon


On Jul 4, 1:33 pm, Srivatsan <mail2vat...@gmail.com> wrote:
> Hello  James Hays,
>
> I have added the libresolv.dylib framework and still no luck. Getting
> same errors, Can you please elaborate in detail how to rectify this
> problem.
>
> Thanks in advance.
>
> Thanks,
> Srivatsan D
>
>
>
> On Sun, Jul 4, 2010 at 8:19 PM, Srivatsan <mail2vat...@gmail.com> wrote:
> > Thanks you very much, Let me check and  back to you.
>
> > Thanks,
> > Srivatsan D
>
> >>> For more options, visit this group athttp://groups.google.com/group/xmppframework?hl=en.

Jon Hjelle

unread,
Jul 4, 2010, 8:05:47 PM7/4/10
to XMPPFramework
I should also note that I am using iPhone SDK 3.1.3, NOT iPhone SDK 4,
so there could still be some additional issues under SDK 4 that I
didn't come across.

Jon

James Hays

unread,
Jul 4, 2010, 11:17:09 PM7/4/10
to xmppfr...@googlegroups.com
There you go. That's what I had to do too. :)

Srivatsan

unread,
Jul 5, 2010, 2:46:28 AM7/5/10
to xmppfr...@googlegroups.com
Thank you very much James Hays.

I'll try with all steps specified by you.

Thanks,
Srivatsan D

Srivatsan

unread,
Jul 5, 2010, 3:18:31 AM7/5/10
to xmppfr...@googlegroups.com
Great James Hays :-)

I can compile xmpp framework both in OS 4 and OS 3.1.3 and have tested
with my Gmail and Open fire accounts.

Works excellent.

Once again thanks for your prompt replies.

Thanks,
Srivatsan D

James Hays

unread,
Jul 5, 2010, 10:32:37 AM7/5/10
to xmppfr...@googlegroups.com
Thanks, Jon, for filling in the details.

Ashley

unread,
Jul 26, 2010, 3:35:33 PM7/26/10
to XMPPFramework
I'm trying out the framework for a MacOS only app, and found that I
also needed to add the RFSRVResolver (h, m) to the framework project.
After I did that, I was getting an error in RFSRVResolver that
complained that a for loop was not using C99 mode.

I believe this was at line 458, and I was able to fix this (after some
googling) by instantiating the index variable outside of the for
loop...

Before...

for (NSUInteger index = 0;
index < srvResultsCount && [self
priorityFromRecords:self.results
atIndex:index] == priority;
index++)
After...


NSUInteger index = 0;

for (index;
index < srvResultsCount && [self
priorityFromRecords:self.results
atIndex:index] == priority;
index++)

Thanks.

Ashley

anubhab123

unread,
Jul 30, 2010, 10:35:01 PM7/30/10
to XMPPFramework
I'm getting the same error as Srivatsan D.

"_kSRVResolverTarget", referenced from:
_kSRVResolverTarget$non_lazy_ptr in XMPPStream.o
(maybe you meant: _kSRVResolverTarget$non_lazy_ptr)

"_kSRVResolverPort", referenced from:
_kSRVResolverPort$non_lazy_ptr in XMPPStream.o
(maybe you meant: _kSRVResolverPort$non_lazy_ptr)

"_OBJC_CLASS_$_RFSRVResolver", referenced from:
objc-class-ref-to-RFSRVResolver in XMPPStream.o

ld: symbol(s) not found
collect2: ld returned 1 exit status

I added libresolv.dylib to the linked Frameworks but no luck. Any help
is appreciated. Thanks

anubhab123

unread,
Jul 30, 2010, 10:39:49 PM7/30/10
to XMPPFramework
I'm getting the same error as Srivatsan D. I added libresolv.dylib to
my linked frameworks but still gives the same errors.

Ashley Roach

unread,
Aug 2, 2010, 11:43:45 AM8/2/10
to xmppfr...@googlegroups.com
I found that I had to actually add the RFSRVResolver .h and .m as well to the project.

Reply all
Reply to author
Forward
0 new messages