Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
19
Help us understand the problem. What is going on with this article?
@73_ch

VSCodeでopenFrameworksをやる環境構築

More than 1 year has passed since last update.

of0.11.0が出ました。
公式でVSCodeをサポートするようになったが、やり方が書いてなかったのでそれをやっていく。

  1. projectGeneratorの設定を選ぶ
    Screen Shot 2019-12-08 at 14.50.47.png

  2. Advanced optionsにチェックをつける
    Screen Shot 2019-12-08 at 14.50.59.png

  3. するとTemplateが選べるようになるのでVisual Studio Code選択
    Screen Shot 2019-12-08 at 14.51.02.png

  4. するとVSCodeのワークスペースが作られたプロジェクトが作られるので、ワークスペースをダブルクリック
    Screen Shot 2019-12-08 at 14.51.48.png

  5. ひらけた

  6. Screen Shot 2019-12-08 at 14.52.06.png

  7. cmd/ctrl + shit + bでタスクを選択できるので、build Debugを選択するとビルドできる

  8. make RunDebugとターミナルで実行すれば、アプリが起動する

ビルドとアプリの実行を同時に行う

  1. ビルドとアプリの実行を毎回別で行うのは面倒臭いので、アプリの実行をタスクにして、アプリの実行の前にビルドを走らせるようにする

.vscode/tasks.jsonに以下を追記。

  • "dependsOn"で先に実行させたいタスクを選択
.vscode/tasks.json
{
    "type": "shell",
    "label": "Run DEBUG",
    "presentation": {
        "reveal": "always",
        "panel": "shared"
    },
    "command": "make RunDebug",
    "group": {
        "kind": "build",
        "isDefault": true
    },
    "problemMatcher": {
        "owner": "cpp",
        "fileLocation": [
            "relative",
            "${workspaceFolder}"
        ],
        "pattern": {
            "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
            "file": 1,
            "line": 2,
            "column": 3,
            "severity": 4,
            "message": 5
        }
    },
    "dependsOn": [
        "Build DEBUG"
    ]
}

これで、憎きXcodeから離脱して快適なoFライフ!!

19
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
73_ch

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
19
Help us understand the problem. What is going on with this article?