Undefined symbols for architecture x86_64: "QNetworkAccessManager::QNetworkAccessManager(QObject*)", referenced from: Downloader::Downloader(QObject*)in downloader.o "QNetworkRequest::QNetworkRequest(QUrl const&)", referenced from: Downloader::Downloader(QObject*)in downloader.o "QNetworkAccessManager::get(QNetworkRequest const&)", referenced from: Downloader::Downloader(QObject*)in downloader.o "QNetworkRequest::~QNetworkRequest()", referenced from: Downloader::Downloader(QObject*)in downloader.o
QString basePath = "http://repo.inmac.org/";QString named;Downloader::Downloader(QObject *parent, QString down) : QObject(parent){ named=down; qnam = new QNetworkAccessManager(this); connect(qnam, SIGNAL(finished(QNetworkReply *)), SLOT(httpFinished(QNetworkReply *))); qnam->get(QNetworkRequest(QUrl(basePath+down)));}void Downloader::httpFinished(QNetworkReply *reply){ QFile file("../Resources/"+named); if (file.open(QIODevice::WriteOnly)) { file.write(reply->readAll()); file.flush(); file.close(); } reply->deleteLater(); reply = 0;}