Dear Open Hub Users,
We’re excited to announce that we will be moving the Open Hub Forum to
https://community.blackduck.com/s/black-duck-open-hub.
Beginning immediately, users can head over,
register,
get technical help and discuss issue pertinent to the Open Hub. Registered users can also subscribe to Open Hub announcements here.
On May 1, 2020, we will be freezing https://www.openhub.net/forums and users will not be able to create new discussions. If you have any questions and concerns, please email us at
[email protected]
Hi there !
I try to create a bot for my jabber server but the built of the exemple project on Gloox homepage doesn't build :(
Here is my structure :
MAIN FOLDER
Directory gloox
FILE main.cppp
here is my main.cpp :
#include iostream
#include gloox/client.h
#include gloox/messagehandler.h
using namespace std;
using namespace gloox;
class Bot : public MessageHandler
{
public:
Bot()
{
JID jid([email protected]/Wikipedia
);
j = new Client(jid,bot
);
j->registerMessageHandler(this);
j->setPresence(PresenceAvailable, 5);
j->connect();
}
virtual void handleMessage(Stanza* stanza,MessageSession* session = 0)
{
Stanza s = Stanza::createMessageStanza(stanza->from().full(), hello world
);
j->send( s );
}
private:
Client j;
};
int main(int argc, char* argv[])
{
Bot b;
};
And here the differents errors :
obj/Debug/main.o||In function JID':|
gloox::JID::setJID(std::basicstring<char, std::chartraits, std::allocator > const&)'|
/usr/local/include/gloox/jid.h|43|undefined reference to
obj/Debug/main.o||In function Bot':|
gloox::Client::Client(gloox::JID const&, std::basicstring<char, std::chartraits, std::allocator > const&, int)'|
veloppement/Wikiber/main.cpp|14|undefined reference to
veloppement/Wikiber/main.cpp|15|undefined reference to gloox::ClientBase::registerMessageHandler(gloox::MessageHandler*)'<br><br>|
gloox::Client::setPresence(gloox::Presence, int, std::basicstring<char, std::chartraits, std::allocator > const&)'|
veloppement/Wikiber/main.cpp|16|undefined reference to
veloppement/Wikiber/main.cpp|17|undefined reference to gloox::ClientBase::connect(bool)'<br><br>|
Bot::handleMessage(gloox::Stanza, gloox::MessageSession)':|
obj/Debug/main.o||In function
veloppement/Wikiber/main.cpp|22|undefined reference to `gloox::Stanza::createMessageStanza(gloox::JID const&, std::basicstring<char, std::chartraits, std::allocator > const&, gloox::StanzaSubType, std::basicstring<char, std::chartraits, std::allocator > const&, std::basicstring<char, std::chartraits, std::allocator > const&, std::basicstring<char, std::chartraits, std::allocator > const&)'|
||=== Build finished: 6 errors, 0 warnings ===|
If someone have and idean, i'm totally lose !!!!
THX
Sorry for structur, i don't know haw to format this !
nobody ?