I’m trying to set up a sample project in Qt creator 4.1 using Ubuntu 16.04 and the latest release from the of master branch. I installed the of add on and tried to import an example project. Then this error occured:
[pathToOf]/libs/openFrameworksCompiled/project/qtcreator/modules/of/of.qbs:555: error: Result of expression ‘CORE.cflags’ [undefined] is not an object.
Does anyone know what this error means, since I never used Qt before.
Thanks in advance
Ok, i used the workflow described by @frauzufall here and everything worked fine.
- Copy (empty) example or old project
scripts/templates/linux64 to project folder
- (optional) change OF path in
- (optional) add
addons.make file with used addons, one per line, if any addons are used
- (optional) add
addons.make file with used addons, one per line
- Go to Qt Creator > New Project > Import Project > Import Existing Project > Chose the project folder > confirm the rest
- Set executable under Projects > Run > Executable (usually I have to put
projectName_debug in there) and set Working directory to
Investigating this issue, it seems to be related to the Qt version.
@brino / @frauzufall 's solution is great but relies on the make build system, simply wrapped into Qt Creator.
I prefer the
.qbs build system which comes with more options, and I managed to get it to compile.
So on Ubuntu / Mint 16.0, I use Qt Creator 4.0.1 with Qt 5.6.1, a freshly generated OF project for Qt linux 64. (not using
addons.make but defining
of.addons in the
Following the Qt setup guide, it did not compile because it was trying to use the C compiler. To get it to compile, I just had to add a “kit” and set it to use C++ instead of C.
–> (Go to projects, manage Kits and in the compiler drop menu select
GCC (C++ x86 64bit in /usr/bin) instead of
GCC (C x86 64bit in /usr/bin))
And voila, build & run.