Help us understand the problem. What is going on with this article?

VSCodeでopenFrameworksをやる環境構築

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ライフ!!

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
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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