Solved Console Applications
-
Thank you very much.
One question:"> test.exe"
Why should we have a
test.exe
file? -
@tomy
Hi
The test.exe comes from the executing the real makefile as neatly explained
in section "mingw32-make " :) -
Hi,
I asked because I don't have that file in the test folder!
-
@tomy
Well do you see .o file ? Maybe there is a build folder one level up?
If not, then show the log (text) you get from running mingw32-make (step)
Maybe there is compile or link error as that would do that no .exe is created.Ah, sorry. Its in the release folder
-
Oops sorry I forget that in windows things like Release/ and Debug/ folders. :)
-
@ambershark
Well i had to follow the sample and see. Was not sure what would really happen :) -
@mrjj Lol. I'm glad it actually worked since I just typed that out without testing anything. And I don't use windows much so I could easily have messed it up. :)
-
Sorry there isn't such a file an any folder there:
-
@tomy Maybe it is just called differently? So, is there ANY *.exe file?
Also, if you build in CMD you actually will see which files are generated. Did you check? -
Look, I did these:
Creating a C++ file named "main" with a simple code in it, in the "test" folder.
Then, found and ran all three commands (qmake -project, qmake, mingw32-make).
And the result as shown above (with no ".exe" file in the "test" folder.
I CMD:
-
@tomy As you cen see the build failed, that's why there is no exe.
-
@tomy Looks like g++ is not found.
Try to add the bin directory of your MinGW installation to PATH and try again. -
Hi
An alternative to fiddling with path is to run the
c:\Qt\5.8\mingw53_32\bin\qtenv2.bat
in the cmd before trying to compile. -
Hi
An alternative to fiddling with path is to run the
c:\Qt\5.8\mingw53_32\bin\qtenv2.bat
in the cmd before trying to compile.Hi,
"The system cannot find the path specified."
Anyway, it's not that important and we can leave it out because it's not my purpose to be familiar with running files from CMd, now. Maybe when needed.
(I liked to test that simple example this way but, the testing may not be so easy) Thanks. -
@tomy Depending on the MinGW version you install the path can be a bit different. Just search for qtenv2.bat file in your Qt installation directory.
-
Yes, I did it and I think the system is set now and ready for the next tests. You can look at this:
"text.exe" exists but nothing is shown after test.exe in CMD.Update:
After re-opening the CMD and testing the .exe:
-
@tomy
what code you write in test? -
@tomy Locate the libgcc_... file on your system and copy it to the same directory with the exe. Or set the PATH variable. See http://stackoverflow.com/questions/4702732/the-program-cant-start-because-libgcc-s-dw2-1-dll-is-missing.
-
@tomy said in Console Applications:
"The system cannot find the path specified."
Well you need to use the correct path for your installation.
It sets the correct path for tools but that you can also do in other ways. -
@tomy
You need to provide the DLLs it wants from the CORRECT compiler folder under c:\Qt
so you end up with (maybe more DLLs)
Please read
http://www.tripleboot.org/?p=138