PDA

View Full Version : Meaning



addu
21st May 2009, 05:55
Hi

What is the meaning of below error lines..



debug/decipher.o: In function `ZN8Decipher17GetStatusUserListERK7QStringNS_6Pare ntE':
D:/login/decipher.cpp:73: undefined reference to `_imp___ZN12QDomDocumentC1Ev'
D:/login/decipher.cpp:75: undefined reference to `_imp___ZN12QDomNodeListC1Ev'
D:/login/decipher.cpp:78: undefined reference to `_imp___ZN12QDomDocument10setContentERK7QStringPS0 _PiS4_'
D:/login/decipher.cpp:83: undefined reference to `_imp___ZNK12QDomDocument17elementsByTagNameERK7QS tring'
D:/login/decipher.cpp:83: undefined reference to `_imp___ZN12QDomNodeListaSERKS_'
D:/login/decipher.cpp:83: undefined reference to `_imp___ZN12QDomNodeListD1Ev'
D:/login/decipher.cpp:83: undefined reference to `_imp___ZN12QDomNodeListD1Ev'
D:/login/decipher.cpp:86: undefined reference to `_imp___ZNK12QDomDocument17elementsByTagNameERK7QS tring'
D:/login/decipher.cpp:86: undefined reference to `_imp___ZN12QDomNodeListaSERKS_'
D:/login/decipher.cpp:86: undefined reference to `_imp___ZN12QDomNodeListD1Ev'
D:/login/decipher.cpp:86: undefined reference to `_imp___ZN12QDomNodeListD1Ev'
D:/login/decipher.cpp:93: undefined reference to `_imp___ZN11QDomElementC1Ev'
D:/login/decipher.cpp:94: undefined reference to `_imp___ZNK8QDomNode9toElementEv'
D:/login/decipher.cpp:94: undefined reference to `_imp___ZN11QDomElementaSERKS_'
D:/login/decipher.cpp:94: undefined reference to `_imp___ZN8QDomNodeD1Ev'
D:/login/decipher.cpp:94: undefined reference to `_imp___ZN8QDomNodeD1Ev'
D:/login/decipher.cpp:101: undefined reference to `_imp___ZNK8QDomNode9namedItemERK7QString'
D:/login/decipher.cpp:101: undefined reference to `_imp___ZNK8QDomNode9toElementEv'
D:/login/decipher.cpp:101: undefined reference to `_imp___ZN11QDomElementaSERKS_'
D:/login/decipher.cpp:101: undefined reference to `_imp___ZN8QDomNodeD1Ev'
D:/login/decipher.cpp:101: undefined reference to `_imp___ZN8QDomNodeD1Ev'
D:/login/decipher.cpp:108: undefined reference to `_imp___ZNK8QDomNode9


thanks

addu

wysota
21st May 2009, 09:10
It means you didn't link with QtXml library.

addu
21st May 2009, 10:39
I have included the Qtxml library

see my file




#include <QtXML/QDomNodeList>
#include <QtCore/QTextStream>


//================================================== ===================
Decipher::Decipher()
{}
//================================================== ===================
Decipher::~Decipher()
{}
//================================================== ===================
Returnables::PublicTimeline* Decipher::PublicTimeline(const QString &xml)
{
Returnables::PublicTimeline *publicTimeline = new Returnables::PublicTimeline();

QDomDocument doc;
QDomNodeList nodeList;
QLinkedList<Returnables::Status*> list;
// Nodes
const QString status = "status";
const QString statusCreatedAt = "created_at";
const QString statusId = "id";
const QString statusText = "text";
const QString statusSource = "source";
const QString statusTruncated = "truncated";
const QString statusInReplyToStatusId = "in_reply_to_status_id";
const QString statusInReplyToUserId = "in_reply_to_user_id";
const QString statusFavorited = "favorited";
const QString user = "user";
const QString userId = "id";
const QString userName = "name";
const QString userScreenName = "screen_name";
const QString userDescription = "description";
const QString userLocation = "location";
const QString userProfileImageUrl = "profile_image_url";
const QString userUrl = "url";
const QString userProtected = "protected";
const QString userFollowersCount = "followers_count";

doc.setContent(xml);

nodeList = doc.elementsByTagName(status);

for(int i=0; i<nodeList.count(); i++)
{
Returnables::Status *status = new Returnables::Status();
QDomElement node;

node = nodeList.at(i).toElement();

status->createdAt = node.namedItem(statusCreatedAt).toElement().text() ;
status->id = node.namedItem(statusId).toElement().text().toUInt ();
status->text = node.namedItem(statusText).toElement().text();
status->source = node.namedItem(statusSource).toElement().text();
status->truncated = (node.namedItem(statusTruncated).toElement().text( ) == "true") ? true : false;
status->inReplyToStatusId = node.namedItem(statusInReplyToStatusId).toElement( ).text().toUInt();
status->inReplyToUserId = node.namedItem(statusInReplyToUserId).toElement(). text().toUInt();
status->favorited = (node.namedItem(statusFavorited).toElement().text( ) == "true") ? true : false;

node = node.namedItem(user).toElement();

status->userInfo.id = node.namedItem(userId).toElement().text().toUInt() ;
status->userInfo.name = node.namedItem(userName).toElement().text();
status->userInfo.screenName = node.namedItem(userScreenName).toElement().text();
status->userInfo.description = node.namedItem(userDescription).toElement().text() ;
status->userInfo.location = node.namedItem(userLocation).toElement().text();
status->userInfo.profileImageUrl = node.namedItem(userProfileImageUrl).toElement().te xt();
status->userInfo.url = node.namedItem(userUrl).toElement().text();
status->userInfo.isProtected = (node.namedItem(userProtected).toElement().text() == "true") ? true : false;
status->userInfo.followersCount = node.namedItem(userFollowersCount).toElement().tex t().toUInt();

list.append(status);
}

publicTimeline->statuses = list;

return publicTimeline;
}
//================================================== ===================
Returnables::FriendsTimeline* Decipher::FriendsTimeline(const QString &xml)
{
Returnables::FriendsTimeline *friendsTimeline = new Returnables::FriendsTimeline();
friendsTimeline->statuses = PublicTimeline(xml)->statuses;
return friendsTimeline;
}

Lykurg
21st May 2009, 10:49
in your pro file QT += xml and rebuild via make clean if necessary.

alisami
21st May 2009, 10:50
what wysota meant was you have to link the xml library.

you can do that by adding the following to your .pro file:


QT += xml

addu
21st May 2009, 11:40
Thanks

that issue solved....


Now it showing errors in Qt libs


c:\Qt\2009.01\qt\lib/libqtmain.a(qtmain_win.o):qtmain_win.cpp:(.text+0x 20d): undefined reference to `qMain(int, char**)'
collect2: ld returned 1 exit status

Lykurg
21st May 2009, 12:20
have you rebuild you project after chancing your pro file?

addu
21st May 2009, 12:34
Ya , i have rebuid my project..

i am getting errors like that

Here i attached my project file..

spirit
21st May 2009, 12:41
add #include <string> into Server.h.
btw, what do you want, create a lib?

addu
21st May 2009, 12:57
yes , i want to create library from the project..

I added the #include <string> in Server.h file...

Same thing is happening ...


please help me

spirit
21st May 2009, 13:01
read this (http://www.qtcentre.org/forum/f-newbie-4/t-dll-using-qt-17255.html).

addu
21st May 2009, 13:06
Hi

Thanks for supports...

I realized my problem..

I did mistake in .pro file..

previously i had given TEMPLATE = app..

But my requirement is lib ...

So i changed app as lib ..

Now it is working..


Thanks

Addu