Baso
Baso

Reputation: 1354

Qt Creator could not find the executable, please specify one

I'm trying to run the texteditor.pro file in the QtSDK\Examples\4.7\tutorials\gettingStarted\gsQml directory with Qt Creator. When I try to build the project I get a window that says

Could Not find the executable, please specify one

with three fields to load files. Snapshot of the dialog box.

I'm running windows 7 64bit, with Qt Creator 2.4.1

Upvotes: 4

Views: 14633

Answers (3)

lalilulelo
lalilulelo

Reputation: 31

I had the could not find executable window pop up in my face in Ubuntu 12.10.

Here's how I got the "error":

  • Created a folder named Project;
  • Inside it, I ran "qmake -project" and then "qmake";
  • Created a main.cpp file inside the folder;
  • Opened the Project.pro file with Qt Creator and added the line "SOURCES += main.cpp" to it;
  • Pressed Ctrl + R to build and run the project.

Later on I deleted the folder and created it again, but this time creating a main.cpp file before trying to run any commands. I opened the .pro file with Qt Creator, created a main function in the main.cpp file, and pressed Ctrl + R, and it built and ran!

Upvotes: 0

Baso
Baso

Reputation: 1354

I've solved the problem it was a missing dll file, but the executable didn't ask for it, so I put all the dlls from Qtcreator -> bin in the same folder with the *.exe file, then I deleted file after another until I figured out what files are required. * It is a brute force way, but It did the job. * Here is the file that were missing (libEGL.dll)

Upvotes: 1

Amit Tomar
Amit Tomar

Reputation: 4858

This project is not created in the normal 'Qt-executable' kind format. Rather its a 'plugin' kind project. So you cant run it directly like other projects.

[If you will open the project files you wont find a main() function!, which is supposed to be the entrance point usually for a C++ Application. All you have are a couple C++ classes. Take that as a hint]

About this example they have given the complete details here. And I quote:

We need to compile the file dialog C++ plugin before the text editor can run. To compile, enter the gsQml directory, then run qmake and compile using make or nmake, depending on your platform. To run, launch qmlviewer and open the texteditor.qml file.

Else:

  1. You create your own project.
  2. Add these class files and the respective qml files to this project.
  3. Add a main and create the respective objects required.
  4. Make an application viewer and give "texteditor.qml" path as its source.

Upvotes: 0

Related Questions