You can use the Reference Manager dialog box to add and manage references to components that you, Microsoft, or another company developed. If you're developing a Universal Windows app, your project automatically references all of the correct Windows SDK DLLs. If you are developing a .NET application, your project automatically references mscorlib.dll. Some .NET APIs are exposed in components that you have to add manually. References to COM components or custom components have to be added manually.
-->
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. I hit F7 and it won't advance any step further.
Reference Manager dialog box
The Reference Manager dialog box shows different categories on the left side, depending on the project type:
Add a reference
Assemblies tab
The Assemblies tab lists all .NET assemblies that are available for referencing. The Assemblies tab doesn't list any assemblies from the global assembly cache (GAC) because assemblies in the GAC are part of the run-time environment. If you deploy or copy an application that contains a reference to an assembly that's registered in the GAC, the assembly won't be deployed or copied with the application, regardless of the Copy Local setting. For more information, see Manage references in a project.
![]()
When you manually add a reference to any of the EnvDTE namespaces (EnvDTE, EnvDTE80, EnvDTE90, EnvDTE90a, or EnvDTE100), set the Embed Interop Types property of the reference to False in the Properties window. Setting this property to True can cause build issues because of certain EnvDTE properties that can't be embedded.
All desktop projects contain an implicit reference to mscorlib. Visual Basic projects contain an implicit reference to Microsoft.VisualBasic. All projects contain an implicit reference to System.Core, even if it's removed from the list of references.
If a project type doesn't support assemblies, the tab won't appear in the Reference Manager dialog box.
The Assemblies tab consists of two sub-tabs:
Some components in the list may not be shown, depending on the framework version of your project. This can occur under the following conditions:
You should avoid adding file references to outputs of another project in the same solution, because doing this may cause compilation errors. Instead, use the Projects tab of the Add Reference dialog box to create project-to-project references. This makes team development easier by enabling better management of the class libraries you create in your projects. For more information, see Troubleshoot broken references.
Note
In Visual Studio 2015 or later, a file reference instead of a project reference is created if the target framework version of one project is .NET Framework 4.5 or later, and the target version of the other project is .NET Framework 2, 3, 3.5, or 4.0.
To display an assembly in the Add Reference dialog box
Projects tab
The Projects tab lists all compatible projects within the current solution, in the Solution sub-tab.
A project can reference another project that targets a different framework version. For example, you could create a project that targets the .NET Framework 4 but that references an assembly that's been built for the .NET Framework 2. However, the .NET Framework 2 project can't reference a .NET Framework 4 project. For more information, see Framework targeting overview.
Note
A project that targets the .NET Framework 4 is incompatible with a project that targets the .NET Framework 4 Client Profile.
Shared Projects tab
Add a reference to a shared project on the Shared Projects tab of the Reference Manager dialog box. Shared Projects let you write common code that's referenced by a number of different application projects.
Universal Windows tab
The Universal Windows tab lists all SDKs that are specific to platforms on which Windows operating systems run.This tab has two subgroups: Core and Extensions.
Core subgroup
Universal Windows app projects have a reference to the Universal Windows SDK by default. Accordingly, the Core subgroup in the Reference Manager doesn't enumerate any of the assemblies from the Universal Windows SDK.
Extensions subgroup
Extensions lists the user SDKs that extend the targeted Windows platform.
An SDK is a collection of files that Visual Studio treats as a single component. In the Extensions tab, SDKs that apply to the project from which the Reference Manager dialog box was invoked are listed as single entries. When added to a project, all of the SDK content is consumed by Visual Studio such that the user doesn't need to take any further actions to leverage the SDK contents in IntelliSense, toolbox, designers, Object Browser, build, deployment, debugging, and packaging.
For information about how to display your SDK in the Extensions tab, see Creating a Software Development Kit.
Note
If a project references an SDK that depends on another SDK, Visual Studio won't consume the second SDK unless you manually add a reference to the second SDK. When a user chooses an SDK on the Extensions tab, the Reference Manager dialog box helps you identify SDK dependencies by listing any dependencies in the details pane.
If a project type doesn't support extensions, this tab doesn't appear in the Reference Manager dialog box.
COM tab
The COM tab lists all COM components that are available for referencing. If you want to add a reference to a registered COM DLL that contains an internal manifest, unregister the DLL first. Otherwise, Visual Studio adds the assembly reference as an ActiveX control instead of as a native DLL.
If a project type doesn't support COM, the tab doesn't appear in the Reference Manager dialog box.
Browse
You can use the Browse button to browse for a component in the file system.
A project can reference a component that targets a different framework version. For example, you could create an application that targets .NET Framework 4.7 but references a component that targets .NET Framework 4. For more information, see Framework targeting overview.
Avoid adding file references to outputs of another project in the same solution, because this tactic may cause compilation errors. Instead, use the Solution tab of the Reference Manager dialog box to create project-to-project references. This makes team development easier by enabling better management of the class libraries that you create in your projects. For more information, see Troubleshoot broken references.
You can't browse to an SDK and add it to your project. You can only browse to a file (for example, an assembly or .winmd) and add it to your project.
When doing a file reference to a WinMD, the expected layout is that the <FileName>.winmd, <FileName>.dll, and <FileName>.pri files are all placed alongside each other. If you reference a WinMD in the following scenarios, an incomplete set of files will be copied into the project output directory and, consequently, build and runtime failures will occur.
Recent
Assemblies, COM, Windows, and Browse each support a Recent tab, which enumerates the list of components that were recently added to projects.
Search
The search bar in the Reference Manager dialog box operates over the tab that's in focus. For example, if a user types 'System' in the search bar while the Solution tab is in focus, the search won't return any results unless the solution consists of a project name that contains 'System'.
See also
Most Linux system administrators and engineers are required to know some basic programming to help them in their daily tasks. If they want to go one step further into the development area as well (either as kernel or application programmers), then C or C++ is the best place to start.
Read Also: Install C, C++ and Development Tools in RHEL/CentOS/Fedora
In this article we will explain how to install C and C++ compilers and it’s Development Tools (build-essential) related packages such as make, libc-dev, dpkg-dev, etc. in Debian and derivatives such as Ubuntu and Linux Mint.
The build-essential software contains an informational list of software’s which are treated as important for building Debian packages including gcc compiler, make and other needed tools.
What is a Compiler?
Simply put, a compiler is a software program that processes instructions written in a programming language and creates a binary file that the machine’s CPU can understand and execute.
In Debian-based distributions, the most well-known C and C++ compilers are gcc and g++, respectively. Both programs were developed and are still maintained by the Free Software Foundation through the GNU project.
Installing C, C++ Compiler and Development Tools (build-essential)
If your system don’t have build-essential package installed in your system by default, you can install the latest available version from the default distribution repositories as follows:
Now we’re ready to start typing C or C++ code… or almost. We’re about to show you yet another tool to boost your development toolset.
Speeding Up C and C++ Compilations
When you know you’ll need to compile a program, make changes, then recompile again it’s great to have a tool like ccache, which as you will probably guess based on its name, is a compiler cache.
It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again. Besides C and C++, it also supports Objective-C and Objective-C++. The only limitations are:
![]()
Let’s install this tool:
Install CCache in Debian
In the next section we will see some examples of C and C++ code compilation with and without ccache.
Testing C and C++ with a sample Program
Let’s use the classical example of a very basic C program that adds two numbers. Open your favorite text editor and enter the following code, then save as
sum.c :
To compile the above code into an executable named sum in the current working directory use the -o switch with gcc:
If you want to take advantage of ccache, just prepend the above command with ccache, as follows:
Then run the binary:
While this basic example does not allow us to see the full power of ccache, for larger programs you’ll quickly realize what a great tool it is. The same applies for C++ programs as well.
SummaryHow To Add Library In Dev C++
In this guide we have shown how to install and use the GNU compilers for C and C++ in Debian and derivatives. In addition, we explained how to use a compiler cache to speed up recompilations of the same code. While you can refer to the online man pages for gcc and g++ for further options and examples, don’t hesitate to drop us a note using the form below If you have any questions or comments.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |