OpenFrameworksをQt CreatorでHello,worldする


参考サイト

OpenFrameworks公式ホームページ
Qt Creator公式ホームページ

環境

OS:MacOSX 10.11.2
OpenFrameworks:0.9.3
Qt Creator:3.5.1

Step1 OpenFrameworks及びQt Creatorをダウンロード

以下のURLより、OpenFrameworks、QtCreatorをダウンローします。

OpenFrameworksダウンロード
Qt Creatorダウンロード

Step2 install_template.shを実行

ダウンロードしたOpenFrameworksフォルダ内に、script -> qtcreator -> install_template.shがあるので、以下のコマンドより実行します。

    chmod a+x install_template.sh
    ./install_template.sh

Step3 コンパイラをclang gccに設定

Qt creatorを起動し、設定 -> ビルドと実行 -> キット -> デスクトップ(デフォルト)より、コンパイラをClangに設定します。以下のスクリーンショットを参考にしてください。

Step4 以下のコードを記入し、実行

以下のコードを実行し、Qt creatorのアプリケーション出力ウィンドウにHELLO,OPENFRAMEWORKS!!が出力されれば完了です。

ofApp.cpp
#include "ofApp.h"

//--------------------------------------------------------------
void ofApp::setup(){

    std::cout << "HELLO,OPENFRAMEWORKS!!" << std::endl;

}