Page 1 of 1

Compile Error: cannot convert 'const char *' to 'const QString &'

Posted: Wed May 12 2021 4:09 am
by ctrain79
I tried to compile KitchenSink with my compile of CopperSpice with MSVC without PostgreSQL that had the following error.

Code: Select all

..\src\graphics\animated_tiles.cpp(106): error C2664: 'void QWidget::setWindowTitle(const QString &)': cannot convert argument 1 from 'const char *' to 'const QString &'
The command I used to configure:

Code: Select all

cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCopperSpice_DIR="D:/Projects/Vendor/lib/cmake/CopperSpice" -DCMAKE_PREFIX_PATH="D:/Projects/Vendor" -DCMAKE_INSTALL_PREFIX=../bin ..
The configuration did not want to find many of the *.cmake library configuration files without the -DCopperSpice_DIR set.

Re: Compile Error: cannot convert 'const char *' to 'const QString &'

Posted: Wed May 12 2021 6:38 pm
by barbara
(1) Did you build CS from master on github? Which commit did you build from with KitchenSink?

If you build CS from master on github please also build KS from master on github.


(2) Based on your other values you now have CopperSpice installed in "D:/Projects/Vendor/lib". The following link shows our directions for building KitchenSink. Please make sure you install about building.

https://www.copperspice.com/docs/cs_overview/demo-ks.html#ks-build-script

Since you are running on Windows, your value for -DCMAKE_PREFIX_PATH=[path_to_copperspice] would be:
-DCMAKE_PREFIX_PATH=D:/Projects/Vendor/lib/cmake/copperspice. On Unix systems the path is slightly different.

There is no need to add "-DCopperSpice_DIR".

Re: Compile Error: cannot convert 'const char *' to 'const QString &'

Posted: Fri May 28 2021 10:14 pm
by barbara
Following up to see if you were able to build both CS and KS from master.

Thanks,

Barbara