treyweaver
3rd January 2011, 13:47
I am trying to get this line to compile:
QList<QHostAddress> ipAddressesList = QNetworkInterface::allAddresses();
I get an error that allAddresses() is undefined. I look in the examples that use this call and they include <QtNetwork>. But when I try to include <QtNetwork> I get this error:
/home/trey/Development/Qt-Projects/EnvironmentTest-build-desktop-Linux/../EnvironmentTest/environment.cpp:6: error: QtNetwork: No such file or directory
When I try this:
#include <QtNetwork/QHostAddress>
I get this error:
/home/trey/Development/Qt-Projects/EnvironmentTest-build-desktop-Linux/../EnvironmentTest/environment.cpp:116: error: undefined reference to `QNetworkInterface::allAddresses()'
What is going on???? I am using 4.7.
QList<QHostAddress> ipAddressesList = QNetworkInterface::allAddresses();
I get an error that allAddresses() is undefined. I look in the examples that use this call and they include <QtNetwork>. But when I try to include <QtNetwork> I get this error:
/home/trey/Development/Qt-Projects/EnvironmentTest-build-desktop-Linux/../EnvironmentTest/environment.cpp:6: error: QtNetwork: No such file or directory
When I try this:
#include <QtNetwork/QHostAddress>
I get this error:
/home/trey/Development/Qt-Projects/EnvironmentTest-build-desktop-Linux/../EnvironmentTest/environment.cpp:116: error: undefined reference to `QNetworkInterface::allAddresses()'
What is going on???? I am using 4.7.