Compiling failed in release mode

Feel free to ask any question here
Post Reply
JamesRayen
Posts: 19
Joined: Tue Aug 23, 2016 1:33 am

Compiling failed in release mode

Post 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!
Attachments
CC.png
CC.png (14.28 KiB) Viewed 2429 times
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Compiling failed in release mode

Post by daniel »

Looks like an issue with the version of Qt? Are you using the right version for the right compiler?
Daniel, CloudCompare admin
JamesRayen
Posts: 19
Joined: Tue Aug 23, 2016 1:33 am

Re: Compiling failed in release mode

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

Re: Compiling failed in release mode

Post 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).
Daniel, CloudCompare admin
JamesRayen
Posts: 19
Joined: Tue Aug 23, 2016 1:33 am

Re: Compiling failed in release mode

Post 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
Post Reply