0

I want to use Microsoft Visual C++ 9.0 on Ubuntu, but I'm not sure if it will work. Is there another program that will work on Ubuntu just as good (if not better) as Visual Studio with Python as the target language?

  • Microsoft Visual C++ 9.0 is not the best way to run C++ code in Ubuntu. Microsoft Visual C++ 9.0 was written to be compatible with the Windows platform, not with the Linux platform. – karel Aug 23 '19 at 08:47
  • 1
    Reviewers: The author is asking about an alternative to Microsoft Visual Studio in Ubuntu. Please don't review this question as an off topic Windows question because of a misleading and superfluous reference to Microsoft Visual C++ 9.0 ☹️ in the first sentence. – karel Aug 23 '19 at 08:54
  • Visual Studio Code with the Python extension works fine for Python development. – BeastOfCaerbannog Aug 23 '19 at 09:28
  • 1
    @karel I think the reference should be edited out and the question reworded. – Andrea Lazzarotto Aug 23 '19 at 09:59

1 Answers1

1

Visual Studio Code can run C++ code with the C/C++ extension and Python code with the Python extension if the Code Runner extension is also installed. Visual Studio Code comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Java, Python, PHP, Go) and runtimes (such as .NET and Unity).

To install Visual Studio Code open the terminal and type:

sudo snap install code --classic

To run a code block with Code Runner, save the source code file by selecting File -> Save, and click the ▶ icon in the upper right corner of the code pane. When you hover the mouse over the ▶ icon a tooltip pops up which says Run Code (Ctrl+Alt+N). The output will be shown in the console pane which is located immediately below the code pane. The terminal command in the first line of the console pane is generated automatically when you click the ▶ icon.

code pane in Visual Studio Code
code pane and console in Visual Studio Code

karel
  • 114,770