I am trying to get this line to compile:
QList<QHostAddress> ipAddressesList = QNetworkInterface::allAddresses();
To copy to clipboard, switch view to plain text mode
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
/home/trey/Development/Qt-Projects/EnvironmentTest-build-desktop-Linux/../EnvironmentTest/environment.cpp:6: error: QtNetwork: No such file or directory
To copy to clipboard, switch view to plain text mode
When I try this:
#include <QtNetwork/QHostAddress>
#include <QtNetwork/QHostAddress>
To copy to clipboard, switch view to plain text mode
I get this error:
/home
/trey
/Development
/Qt
-Projects
/EnvironmentTest
-build
-desktop
-Linux
/..
/EnvironmentTest
/environment.
cpp:116: error
: undefined reference to `
QNetworkInterface::allAddresses()'
/home/trey/Development/Qt-Projects/EnvironmentTest-build-desktop-Linux/../EnvironmentTest/environment.cpp:116: error: undefined reference to `QNetworkInterface::allAddresses()'
To copy to clipboard, switch view to plain text mode
What is going on???? I am using 4.7.
Bookmarks