Compiled successfully but "application failed to start"

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
foobarbecue
Posts: 16
Joined: Thu Mar 13, 2014 7:20 pm

Compiled successfully but "application failed to start"

Post 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!
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Compiled successfully but "application failed to start"

Post 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?
Daniel, CloudCompare admin
foobarbecue
Posts: 16
Joined: Thu Mar 13, 2014 7:20 pm

Re: Compiled successfully but "application failed to start"

Post by foobarbecue »

I actually switched to Release build, and I was running the .exe from powershell, outside of visual studio.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Compiled successfully but "application failed to start"

Post 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?
Daniel, CloudCompare admin
foobarbecue
Posts: 16
Joined: Thu Mar 13, 2014 7:20 pm

Re: Compiled successfully but "application failed to start"

Post 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
foobarbecue
Posts: 16
Joined: Thu Mar 13, 2014 7:20 pm

Re: Compiled successfully but "application failed to start"

Post 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.
foobarbecue
Posts: 16
Joined: Thu Mar 13, 2014 7:20 pm

Re: Compiled successfully but "application failed to start"

Post 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
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Compiled successfully but "application failed to start"

Post by daniel »

Nice job! I still compile with Qt 5.9 on my side. This Qt 5.12 "bug" is really strange...
Daniel, CloudCompare admin
wendylaw
Posts: 2
Joined: Mon Nov 22, 2021 7:56 pm

Re: Compiled successfully but "application failed to start"

Post 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?"
Last edited by wendylaw on Wed Nov 24, 2021 9:29 pm, edited 1 time in total.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Compiled successfully but "application failed to start"

Post by daniel »

So generally it's just a matter of upgrading the graphic card driver... or the graphic card itself ;)
Daniel, CloudCompare admin
Post Reply