Problem compiling addons with QtCreator

ji friends,
my project needs the ofxLibwebsockets addon, and works fine on OSX and Windows.

With Linux unfortunately QtCreator refuses to compile, complaining it can’t find some header files. From the command line (with make - make RunRelease) everything is working properly and the app runs correctly.

I created the project with project generator, then imported it in QtCreator. It looks like the ADDON_INCLUDE directives specified in addons_config.mk (in the “common” section) are being ignored.

Is there a fix for this? Or may be I did something wrong? OF is 0.9.8 release, QtCreator 4.1.0, Ubuntu 16.04.2 LTS

thanks!

hello,

only core addons are automatically included in QtCreator
external addons has to be declared manually in the project .qbs file

    of.addons: [
         'ofxLibwebsockets'
     ]

Uhm, the relevant part inproject.qbs is commented, like this

    // This project is using addons.make to include the addons
    // since it was imported from old code. To change it to include
    // the addons from the qbs file change the following lines to
    // the list of used addons in array format. eg:
    //
    // of.addons: [
    //     'ofxGui',


    //     'ofxOpenCv',
    // ]

and addons.make has these two lines:

ofxLibwebsockets
ofxXmlSettings

I’ll try to create a new project with QtCreator and manually add the addons, let’s see what happens

Ok, now it is working… but I had to manually add all the include paths for the addon (that were already in addons_config.mk

of.includePaths: ['~/of_v0.9.8_linux64_release/addons/ofxLibwebsockets/libs/ofxLibwebsockets/include/ofxLibwebsockets',
                          '~/of_v0.9.8_linux64_release/addons/ofxLibwebsockets/libs/jsoncpp/json',
                          '~/of_v0.9.8_linux64_release/addons/ofxLibwebsockets/libs/libwebsockets/include',
                          '~/of_v0.9.8_linux64_release/addons/ofxLibwebsockets/src/',
                          '~/of_v0.9.8_linux64_release/addons/ofxLibwebsockets/libs/ofxLibwebsockets/include']

is the openframeworks qtcreator template installed and did you install import your project into qtcreator ?

It seems that the “import project” feature does not honour the header search paths specified by the addon, manually adding everything (and creating a new openframeworks project from scratch) did the trick. But it is something that should be fixed, I believe.

Also ofxCv stopped working with latest qtcreator and of0.9.8 on Linux 64bit. All my projects with addons, such as ofxCv and ofxFaceTracker, will not compile. They give errors while searching for header files of addons, even though I added the addon as usual in qt project file. Qt template is working without doubt on examples. Please help!!!

the latest qtcreator is not officially supported with 0.9.8. the build system has changed quite a bit since we published the latest release. you can use an older version of qt creator (the one recommended on the install guide) or use the openframeworks nightly builds