Page 1 of 1

Compiling failed in release mode

Posted: Wed Jun 12, 2019 2:38 pm
by JamesRayen
Hi, I am trying to compile CC from source code and I have succeeded in compiling CC on my laptop, but I failed to compile it on my desktop, both my laptop and desktop have the same environment, i.e., win10, VS2015 and cmake, the problem I met is shown in the picture(see the attachment) when I compiled CC in release mode on my desktop (in debug mode, no problems), could anyone can help me? Thank you!

Re: Compiling failed in release mode

Posted: Thu Jun 13, 2019 6:12 pm
by daniel
Looks like an issue with the version of Qt? Are you using the right version for the right compiler?

Re: Compiling failed in release mode

Posted: Fri Jun 14, 2019 12:15 am
by JamesRayen
daniel wrote: Thu Jun 13, 2019 6:12 pm Looks like an issue with the version of Qt? Are you using the right version for the right compiler?
Actually, I don't think so as I installed the same Qt version(Qt5.8.0) on my laptop and desktop computer. However, I still have no idea of the reason caused the problem, it is so weird. I do re-compile the CC several times on my desktop computer, but there is still no changes.

Re: Compiling failed in release mode

Posted: Fri Jun 14, 2019 8:07 am
by daniel
This is an issue with the Qt version (trust me ;), but I see that you run the project from the build directory. You have to 'install' CloudCompare first (with the INSTALL project) and then run CloudCompare from the installation directory (see the BUILD.md file).

It copies the right version of Qt DLLs (and other DLLs) next to the executable so as to be sure that the right versions are use. Otherwise, any Qt DLL available in the PATH will be used in replacement (and you'll end up with this kind of issue).

Re: Compiling failed in release mode

Posted: Fri Jun 14, 2019 3:11 pm
by JamesRayen
daniel wrote: Fri Jun 14, 2019 8:07 am This is an issue with the Qt version (trust me ;), but I see that you run the project from the build directory. You have to 'install' CloudCompare first (with the INSTALL project) and then run CloudCompare from the installation directory (see the BUILD.md file).

It copies the right version of Qt DLLs (and other DLLs) next to the executable so as to be sure that the right versions are use. Otherwise, any Qt DLL available in the PATH will be used in replacement (and you'll end up with this kind of issue).
I tried as you said, it's actually an issue with the Qt version. As I have added Anaconda to my environment, the generated cloudcompare.exe in release folder looks for the Qt DLLs in 'Anaconda/Library/bin' first as its environment variable is before Qt's, which leads to the problem. Thank you so much! Daniel