Error uses QNetworkInterface::allInterfaces()
I try to use snip code below but get error is crashed when run app.
@ QList<QNetworkInterface> l_list = QNetworkInterface::allInterfaces();@
Please tell me reason and resolve?
I build on release mode and click .exe to lauch app is crashed. But if i runing on Qt Creator without error.
I use Qt4.8.
Thanks in advance.
If you double click the exe the same rules applies as in the "deployment documentation":http://qt-project.org/doc/qt-4.8/deployment-windows.html
I copied dll files (such as: QtNetworkd.dll, QtCore4.dll, QtGui4.dll) which i link library in project into directory same with exe file but also crashed.
Did you check each point of the deployment doc ?
Also verify that you have all dependencies with Dependency Walker.
[quote author="phamvanan" date="1375260031"]Hi,
I copied dll files (such as: QtNetworkd.dll, QtCore4.dll, QtGui4.dll) which i link library in project into directory same with exe file but also crashed.[/quote]
you used QtNetworkd.dll or is it just a typo? QtNetworkd.dll is for debug builds.
Really sorry you, this is my mistake. I use QtNetwork4.dll, not QtNetworkd4.dll
I try to build debug mode in QtCreator and then runing .exe file, result not crashed. But i switch release mode to build, i get crashed when running .exe file.
Do you mean it also crashes when started from QtCreator in release mode ?
No, I don't.
I'm running in QtCreator in release mode not crash, but runing from .exe file is crashed. Also debug mode, both start from QtCreator and exe file are fine working.
Then again, did you check that you have all dependencies/plugins in the exe folder ?
OK. thank you for your help.
Let me see again.