PDA

View Full Version : Linking error: libQtNetwork.so: undefined reference to `_freeifaddrs'



dacla
27th March 2008, 08:19
Hi,

I am trying to compile an application but I get the following errors when linking:

/home/inigom/qtopia/qtopia/lib/libQtNetwork.so: undefined reference to `_freeifaddrs'
/home/inigom/qtopia/qtopia/lib/libQtNetwork.so: undefined reference to `_getifaddrs'

There are no other errors.
I have added QT += network to the .pro file so that it would use the network libraries.

The program compiles fine if I don't use the -embedded option but fails if I add it. (I must use that option)

Does anyone have any suggestion?

jpn
31st March 2008, 13:13
A wild guess, try compiling Qtopia without such dependency by modifying configure-script:


CFG_GETADDRINFO=auto
CFG_IPV6IFNAME=auto
CFG_GETIFADDRS=auto

to


CFG_GETADDRINFO=no
CFG_IPV6IFNAME=no
CFG_GETIFADDRS=no

and rebuild Qtopia.

dacla
31st March 2008, 21:53
I didn't know that the configure script could be modified in order to save these kind of problems. Your suggestion was really helpful and solved this issue.

dacla
21st April 2008, 22:26
1. CFG_GETADDRINFO=no
2. CFG_IPV6IFNAME=no
3. CFG_GETIFADDRS=no

I want to know more about those flags modified in the configure script. If I disable them will it change the performance of the QNetwork classes? I have noticed some problems when trying to run applications with the QNetwork module's classes after modifying those flags. The linux kernel panics when I run them and the application exits.