Trí Phan
Trí Phan

Reputation: 1193

How can I rename my a.exe file in Visual Studio Code?

I have a main.cpp file, when I build it by using task.json, it genarates an a.exe file. How can I change the name of that exe file to something else like main.exe when I build the cpp file?

Upvotes: 4

Views: 2955

Answers (1)

Artem Alekseev
Artem Alekseev

Reputation: 66

a.exe is default output name of gcc compiler. To choose different name, in task.json use argument "-o". Example:

 "args": [
            "-g",
            "main.cpp",
            "-o",
            "YourProgName"
        ]

Upvotes: 5

Related Questions