Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode MakeFile tool configuration

I am trying to use MakeFile Tool to run makefiles in VSCode. When trying to set the configuration to Default, it says "No configurations defined in makefile.configurations setting." here is what the settings.json looks like.

{
    "omnisharp.path": "latest",
    "makefile.makePath": "C:\\Program Files (x86)\\GnuWin32\\bin\\make",
    "makefile.launchConfigurations": [

    ],
}
like image 241
Parker Avatar asked Jul 20 '26 15:07

Parker


2 Answers

Sharing relevant properties from .vscode/settings.json:

{
    "makefile.configurations": [
        {
            "name": "Default",
            "makeArgs": []
        }
    ],
    "makefile.launchConfigurations": [
        {
            "cwd": FULL_PATH_O_EXECUTABLE_DIR,
            "binaryPath": FULL_PATH_O_EXECUTABLE_FILE,
            "binaryArgs": []
        }
    ],
    "makefile.buildLog": "",
    "makefile.loggingLevel": "Normal"
}

These are basic settings for Makefile Tools extension created by default through vscode.

Now, while having ./Makefile in the project main directory, the extension should determine the file automatically, and you can see it associated with the file in the extension sidebar, under "Makefile" section. Additionally, the "Launch target" section also should be associated with your executable file path.

When all of those have been set, you can just build the project through the extension sidebar button (at the top, play icon).

like image 134
Oz Levi Avatar answered Jul 26 '26 19:07

Oz Levi


you need to add something like this to this settings file.

    "makefile.configurations": [
    {
        "name": "myconf",
        "buildLog": "",
        "makeArgs": [],
        "makeDirectory": "",
        "makefilePath": "",
        "makePath": "",
        "problemMatchers": []
    },
]

Don't forget to fill those "" with the your settigns

like image 35
hamaney Avatar answered Jul 26 '26 20:07

hamaney



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!