I've just installed Dev-C 5.11 on Windows 7 64 bits. I can compile and execute the program just fine. I can add a watchpoint and go step by step, BUT if I add a Watch to see a variable, the debug freezes. Can I compile a program including header files like conio.h and iostream.h and using namespace std in Dev-C? If not please suggest a good compiler in which I can do a program containing the header files mentioned above. I tried doing the same program in turbo C and microsoft visual studio 2010 express and it is working properly.
C/C++ support for Visual Studio Code is provided by a Microsoft C/C++ extension to enable cross-platform C and C++ development on Windows, Linux, and macOS.
Getting started
C/C++ compiler and debugger
The C/C++ extension does not include a C++ compiler or debugger. You will need to install these tools or use those already installed on your computer.
Popular C++ compilers are:
- GCC on Linux
- GCC via Mingw-w64 on Windows
- Microsoft C++ compiler on Windows
- Clang for XCode on macOS
Make sure your compiler executable is in your platform path so the extension can find it. You can check availability of your C++ tools by opening the Integrated Terminal (⌃` (Windows, Linux Ctrl+`)) in VS Code and try running the executable (for example g++ --help
).
Install the Microsoft C/C++ extension
- Open VS Code.
- Click the Extensions view icon on the Sidebar (⇧⌘X (Windows, Linux Ctrl+Shift+X)).
- Search for
c++
. - Click Install.
Hello World tutorials
Get started with C++ and VS Code with Hello World tutorials for your environment:
Documentation
You can find more documentation on using the Microsoft C/C++ extension under the C++ section, where you'll find topics on:
Remote Development
VS Code and the C++ extension support Remote Development allowing you to work over SSH on a remote machine or VM, inside a Docker container, or in the Windows Subsystem for Linux (WSL).
To install support for Remote Development:
- Install the VS Code Remote Development Extension Pack.
- If the remote source files are hosted in WSL, use the Remote - WSL extension.
- If you are connecting to a remote machine with SSH, use the Remote - SSH extension.
- If the remote source files are hosted in a container (for example, Docker), use the Remote - Containers extension.
Feedback
If you run into any issues or have suggestions for the Microsoft C/C++ extension, please file issues and suggestions on GitHub. If you haven't already provided feedback, please take this quick survey to help shape this extension for your needs.
-->Linux support is available in Visual Studio 2017 and later.
This topic describes how to configure a C++ Linux project as described in Create a new C++ Linux project in Visual Studio. For CMake Linux projects, see Configure a Linux CMake Project.
You can configure a Linux project to target a physical Linux machine, a virtual machine, or the Windows Subsystem for Linux (WSL).
Visual Studio 2019 version 16.1:
When targeting WSL, you can avoid the copy operations that are necessary for building and IntelliSense when targeting remote Linux systems.
You can specify separate Linux targets for building and debugging.
General settings
To view configuration options, select the Project > Properties menu, or right click on the project in Solution Explorer and select Properties from the context menu. The General settings appear.
By default, an executable (.out) is built. To build a static or dynamic library, or to use an existing Makefile, use the Configuration Type setting.
For more information about the settings in the property pages, see Linux Project Property Page Reference.
Remote settings
To change settings pertaining to the remote Linux computer, configure the remote settings that appear under General.
To specify a remote target Linux computer, use the Remote Build Machine entry. This will allow you to select one of the connections created previously. To create a new entry, see the Connecting to Your Remote Linux Computer section.
Visual Studio 2019 version 16.1: To target Windows Subsystem for Linux, click the down arrow for Platform Toolset and choose WSL_1_0. The other remote options will disappear and the path to the default WSL shell will appear in their place:
If you have side-by-side WSL installations, you can specify a different path here. For more information about managing multiple distros, see Manage and configure Windows Subsystem for Linux.
You can specify a different target for debugging on the Configuration Properties > Debugging page.
The Remote Build Root Directory determines the root location of where the project is built on the remote Linux computer. This will default to ~/projects unless changed.
The Remote Build Project Directory is where this specific project will be built on the remote Linux computer. This will default to $(RemoteRootDir)/$(ProjectName), which will expand to a directory named after the current project, under the root directory set above.
Note
Dev C Compiler
To change the default C and C++ compilers, or the Linker and Archiver used to build the project, use the appropriate entries in the C/C++ > General section and the Linker > General section. You can specify a certain version of GCC or Clang, for example. For more information see C/C++ Properties (Linux C++) and Linker Properties (Linux C++).
Dev C++ Source File Not Compiled Error
Copy sources (remote systems only)
When building on remote systems, the source files on your development PC are copied to the Linux computer and compiled there. By default, all sources in the Visual Studio project are copied to the locations set in the settings above. However, additional sources can also be added to the list, or copying sources can be turned off entirely, which is the default for a Makefile project.
Sources to copy determines which sources are copied to the remote computer. By default, the @(SourcesToCopyRemotely) defaults to all source code files in the project, but does not include any asset/resource files, such as images.
Copy sources can be turned on and off to enable and disable the copying of source files to the remote computer.
Additional sources to copy allows you to add additional source files which will be copied to the remote system. You can specify a semi-colon delimited list, or you can use the := syntax to specify a local and remote name to use:
C:ProjectsConsoleApplication1MyFile.cpp:=~/projects/ConsoleApplication1/ADifferentName.cpp;C:ProjectsConsoleApplication1MyFile2.cpp:=~/projects/ConsoleApplication1/ADifferentName2.cpp;
Build events
Since all compilation is happening on a remote computer (or WSL), several additional Build Events have been added to the Build Events section in Project Properties. These are Remote Pre-Build Event, Remote Pre-Link Event, and Remote Post-Build Event, and will occur on the remote computer before or after the individual steps in the process.
Dev C++ Project Is Not Compiled Hatası
IntelliSense for headers on remote systems
When you add a new connection in Connection Manager, Visual Studio automatically detects the include directories for the compiler on the remote system. Visual Studio then zips up and copies those files to a directory on your local Windows machine. After that, whenever you use that connection in a Visual Studio or CMake project, the headers in those directories are used to provide IntelliSense.
Note
In Visual Studio 2019 version 16.5 and later, the remote header copy has been optimized. Headers are now copied on-demand when opening a Linux project or configuring CMake for a Linux target. Vst vocal effects downloads. The copy occurs in the background on a per-project basis, based on the project's specified compilers. For more information, see Improvements to Accuracy and Performance of Linux IntelliSense.
This functionality depends on the Linux machine having zip installed. You can install zip by using this apt-get command:
To manage your header cache, navigate to Tools > Options, Cross Platform > Connection Manager > Remote Headers IntelliSense Manager. To update the header cache after making changes on your Linux machine, select the remote connection and then select Update. Select Delete to remove the headers without deleting the connection itself. Select Explore to open the local directory in File Explorer. Treat this folder as read-only. To download headers for an existing connection that was created prior to Visual Studio 2017 version 15.3, select the connection and then select Download.
You can enable logging to help troubleshoot problems:
See also
Set compiler and build properties
C++ General Properties (Linux C++)
VC++ Directories (Linux C++)
Copy Sources Project Properties (Linux C++)
Build Event Properties (Linux C++)