Undefined Reference To...
I'm trying to buid application that uses Iris XMPP together with QCA (http://delta.affinix.com/), but when I compile my application I got following errors.
Build Issues:
undefined reference to 'ntohs@4'
...
...
Compile Output:
../iris/lib/libiris.a(s5b.o):s5b.cpp:(.text+0xf23d): undefined reference to `ntohs@4'
../iris/lib/libirisnet.a(jdns_mdnsd.o):jdns_mdnsd.c:(.text+0x1 08c): undefined reference to `htons@4'
...
...
QCA and Iris compiles without build issues and I have added includepath and libs from Iris as well.
What that undefined reference to ... means?
All replies are welcome. :)
Re: Undefined Reference To...
undefined reference generally means that the mentioned function is not defined. You should seek a solution in the networking part of the code cuz these functions are used while networking.
Re: Undefined Reference To...
But, what does it mean? Missing binaries? Missing libraries? Missing headers or...?
Re: Undefined Reference To...
this primarily means that the function is not defined..so i'll guess its a missing library cuz its a linking error. Also, according to me, those functions are common network library functions which are used to convert the byte orders when transferring from one place to another. so, its definitely a networking library that is missing
Re: Undefined Reference To...
But libiris.a and libirisnet.a exists, as I have compiled Iris successfully and I have added the libraries to my pro file like this:
LIBS += -L$$PWD/../iris/lib \
-liris \
-lirisnet
And the path is correct so I'm puzzled. :crying:
Re: Undefined Reference To...
well, googling ur specific error, i found that sm other people have also had this problem..sm cuz of compiler issue and some had not included libraries..
http://www.gammon.com.au/forum/bbsho...ubject_id=2574
see this, if it helps..reason of this error is DEFINITELY that the lib is missing
Re: Undefined Reference To...
Ok thanks for all the answers. Maybe the problem is, that the compiler doesn't see the library files, even though they exist. So perhaps I should add that path to enviromental variable PATH or copy manually the files so that the linker will find the libraries...