Page 1 of 1

Compiled successfully but "application failed to start"

Posted: Mon Feb 11, 2019 5:50 am
by foobarbecue
I just managed to compile CC for the first time using MS Visual Studio 2017, following the instructions in BUILD.md . I ran the ALL_BUILD project and then the INSTALL project.

However, when I run my generated CloudCompare.exe, I get a dialog saying:

"The application failed to start because it could not find or load the Qt platform plugin "windows" in "",

I do have a file in ./platforms/qwindows.dll , if CloudCompare.exe is in .

Any idea what I'm doing wrong? Thanks!

Re: Compiled successfully but "application failed to start"

Posted: Mon Feb 11, 2019 9:08 pm
by daniel
Have you changed the path of the 'debug' command in Visual Studio? So that you run the executable copied in the installation folder and not the default one in the build directory?

Re: Compiled successfully but "application failed to start"

Posted: Tue Feb 12, 2019 6:46 am
by foobarbecue
I actually switched to Release build, and I was running the .exe from powershell, outside of visual studio.

Re: Compiled successfully but "application failed to start"

Posted: Tue Feb 12, 2019 6:12 pm
by daniel
Which version of Qt are you using? Can you look inside the 'plugins\platforms' folder of Qt and see if there are additional DLLs that may be required by this Qt version maybe?

Re: Compiled successfully but "application failed to start"

Posted: Sat Feb 16, 2019 5:49 am
by foobarbecue
I'm using Qt 5.12.1 . What version do you normally use?

I noticed that if I run start.bat instead of CloudCompare.exe (which replaces PATH with only the install dir), I get a different result. Instead of "failed to start" I get"
The code execution cannot proceed because libpng16.dll was not found. Reinstalling the program may fix this problem.
and a similar error for zlib.dll .

Qt 'plugins\platforms' has these files:

qdirect2d.dll
qdirect2dd.dll
qminimal.dll
qminimald.dll
qoffscreen.dll
qoffscreend.dll
qwindows.dll
qwindowsd.dll

Re: Compiled successfully but "application failed to start"

Posted: Sat Feb 16, 2019 6:29 am
by foobarbecue
By the way, I have Anaconda installed and in the PATH... I think that's where it's getting zlib.dll and libpng16.dll from.

Also, CMake has put Anaconda paths in the config:

Qt5Concurrent_DIR C:/Users/aaron/Anaconda3/Library/lib/cmake/Qt5Concurrent
Qt5Core_DIR C:/Users/aaron/Anaconda3/Library/lib/cmake/Qt5Core
...

I guess these should point to the config files in my Qt installation. I'll try that.

Re: Compiled successfully but "application failed to start"

Posted: Sat Feb 16, 2019 7:05 am
by foobarbecue
Hooray, I got it to compile and run! I just had to make sure nothing was pointing to my Anaconda version of Qt stuff, and then I also had to deal with a C2666 error, but luckily someone had already solved it here:

https://github.com/buaagy/CloudCompare/ ... a8c19fb1f5

Re: Compiled successfully but "application failed to start"

Posted: Sat Feb 16, 2019 12:34 pm
by daniel
Nice job! I still compile with Qt 5.9 on my side. This Qt 5.12 "bug" is really strange...

Re: Compiled successfully but "application failed to start"

Posted: Mon Nov 22, 2021 8:28 pm
by wendylaw
Even though it's been about two years, I still ran into exactly the same error. Can you please explain how to get rid of this error: "application failed to start". I myself have already tried and unfortunately could not get rid of it. At the moment, I'm working on a fairly old laptop, with a weak processor and a not very powerful built-in graphics card. Perhaps the main problem is in my laptop, and not in the program. But I can't buy a new laptop right now, so I hope that the problem can be somehow circumvented, maybe? The strangest thing is that applications like https://flipabit.dev/, take a long time to load, but work without any problems. That's probably the only reason I still have hope.
P.S: "I decided instead of writing a new message to just change the old one, I hope this is not a problem?"

Re: Compiled successfully but "application failed to start"

Posted: Tue Nov 23, 2021 8:41 pm
by daniel
So generally it's just a matter of upgrading the graphic card driver... or the graphic card itself ;)