Home

C++ and the Common Language Infrastructure

 

Introduction

When the C++ language was created, many of today’s computer and objects (components) requirements were not available and there probably was no need to consider them. As new issues came up, additional libraries were developed to complement the language. Examples of these libraries are the Standard Template Library (STL) and boost. Still either those libraries have their own limitations or they can only follow the original trend set in C++ as a language. Even if these libraries solved many problems, they are not known for their ability to collaborate with other languages.

C++ and the CLI

To address the limits of C++, to allow it to interact with other languages, and to modernize it with new software requirements, Microsoft created a new C++ flavor and named it C++/CLI. To make it possible for this language to be used by other companies and on other operating systems, Microsoft submitted its draft to international organizations for public standardization.

A Compiler

C++/CLI is a computer language that uses specific syntaxes and rules to allow a person, called a user, to give instructions to the machine. To give these instructions, you write a mix of easy to identify and relatively easy to use words in a human language such as English. You create these instructions in a computer file and save them with the .cpp extension. There can also be other files with other types of extensions such as .h. When the instructions are ready, you submit them to a program called a compiler that will translate your instructions from English to a machine language.

To make it easy to create programs using the C++/CLI language in Microsoft Windows, the company developed Microsoft Visual C++ 2005, which has the compiler “embedded” in it.

The Microsoft CL Compiler

CL, the compiler used in Microsoft Visual C++ 2005 is very powerful and practically unique. It “understands” more languages than any other compiler of the Microsoft Visual Studio 2005 family. You can use CL to compile programs written in C, in C++, and in C++/CLI. Yes, these are three different languages. In fact, you can include C, C++, and C++/CLI code in the same file and it would compile fine.

 

Previous Copyright © 2006-2016, FunctionX, Inc. Next