cmake - cannot run simple Qt example program, vague error -


i'm trying run simple example program qt dialog example. compiled using cmake , nmake, upon running get:

cannot correctly start application (0xc0150002). click ok close application.

the main.cpp i'm using:

 #include <qapplication>  #include "dialog.h"    int main(int argc, char *argv[])  {     qapplication app(argc, argv);     dialog dialog;     return dialog.exec();   } 

the simplest thing can work

 #include <qapplication>  #include <iostream>  #include "dialog.h"   using namespace std;   int main(int argc, char *argv[])  {    cout << "test!" << endl;      // qapplication app(argc, argv);      // dialog dialog;      //return dialog.exec();   return 0;   } 

so can't use qt related, ideas on how solve issue?

thanks!

it might qt dlls aren't found when program starts.

you can check copying qt dll files qt's bin folder folder program executable is.

or set path system variable contain folder qt libraries are, dlls under windows.

if under windows, there tool can use.

depedency walker, start it, start "visual studio command prompt" , type "depends"

drag & drop application file dependency walker , should see dlls cannot load.

note program isn't accurate though, in case should work.


Comments