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

An application which demonstrates how to use the CopperSpice libraries
Post Reply
ctrain79
Posts: 9
Joined: Sun May 09 2021 9:34 pm

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

Post 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.
barbara
Posts: 470
Joined: Sat Apr 04 2015 2:32 am
Contact:

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

Post 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".
barbara
Posts: 470
Joined: Sat Apr 04 2015 2:32 am
Contact:

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

Post by barbara »

Following up to see if you were able to build both CS and KS from master.

Thanks,

Barbara
Post Reply