how to configure fresh VS CE 2022 install for C++ development like selecting which compiler to use?

Rino Mardo 1 Reputation point
2022-07-16T01:18:42.097+00:00

hi. usually when one selects a project to start development with, all the environment settings like which compiler to use are pre-selected. but when one starts with no project, just a new C++ file, all the settings are not configured.

how does one, without using the solutions/projects, configure VS CE 2022 for a selected compiler/headers ?

p.s. it says "No Configurations" or "Select Startup Items" in the place where a debugger used to show (when a project is selected to start development).

Developer technologies | C++
{count} votes

1 answer

Sort by: Most helpful
  1. Minxin Yu 13,506 Reputation points Microsoft External Staff
    2022-07-18T03:42:40.747+00:00

    Hi, @Rino Mardo

    when one starts with no project, just a new C++ file, all the settings are not configured

    You can refer to the document: Open Folder support for C++ build systems in Visual Studio

    {  
      "version": "0.2.1",  
      "tasks": [  
        {  
          "taskLabel": "build hello",  
          "appliesTo": "/",  
          "type": "default",  
          "command": "g++",  
          "args": [  
            "-g",  
            "-o",  
            "hello",  
            "hello.cpp"  
          ]  
        }  
      ]  
    }  
    

    Best regards,

    Minxin Yu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.