【问题标题】:Vscode task & emscriptenVscode 任务 & emscripten
【发布时间】:2017-08-27 22:10:14
【问题描述】:

我创建了一个自定义任务,它使用 emscripten 编译我的“C”文件,但输出文件保存在我工作区的根目录中。 我想改变这个,所以编译后的文件和我的输入js文件保存在同一目录中

我的 task.json 文件:

{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"command": "echo",
"args": ["Hello World"],
"tasks": [
    {
        "taskName": "Emscripten + HTML",
        "type": "shell",
        "command": "emcc ${file} -o ${fileBasename}.html" 
    },
    {
        "taskName": "Emscripten + Webassemby + html",
        "type": "shell",
        "command": "emcc ${file} -s WASM=1 -o ${fileBasename}.html"
    }
]
}

【问题讨论】:

    标签: visual-studio-code emscripten webassembly vscode-tasks


    【解决方案1】:

    在输出文件名而不是${fileBasename}.html

    使用${fileDirname}/${fileBasename}.htm

    【讨论】:

    • 是的,这就是解决方案,我问了这个问题 5 分钟后才意识到。谢谢
    猜你喜欢
    • 1970-01-01
    • 2021-08-21
    • 2015-09-23
    • 1970-01-01
    • 2018-10-30
    • 1970-01-01
    • 2017-11-27
    • 2015-07-14
    • 2018-11-24
    相关资源
    最近更新 更多