How to create C ++ programs without having to run the .net framework (e.g. ccleaner and utorrent)

I was wondering how are programs like ccleaner and utorrent created? AFAIK they are written in C ++, but they work without the need for the .net framework and, apparently, work on Windows 98. How can this be done? Visual C ++ requires the installation of a .NET environment to run the binary.

While the .NET network is free, this can be a problem, and it is likely to cause many users to leave because the setup is 20 MB + and installs several files / entries in the registry.

+7
c ++ frameworks
source share
5 answers

Visual C ++ requires the .net framework to run the binary.

No, it is not. In fact, C ++ and the .NET Framework are very unconnected. You will only need the .NET framework if your application is written in C ++ / CLI, which is far from regular C ++.

If you are developing an application in standard C ++, you do not need the .NET infrastructure, but only the runtime that comes with your toolchain (Visual C ++, mingw, whatever). In some cases, you can also refer to runtime statically, so you don’t even need to distribute DLLs, etc.

As for creating graphical interfaces in regular C ++, there are tools there. Microsoft offers bare Windows API, MFC, WTL , and there are third-party products like Qt or wxWidgets

+15
source share

Create your own C ++ project without using the CLI. In the VC ++ Application Wizard, you can select any type except the CLI.

A native C ++ project has its own runtime requirements: C / C ++ runtime, MFC runtime (if using MFC), but the .NET Framework is not required.

+4
source share

When creating a project, configure it as a Win32 project, not a CLR project. This ensures that you are compiling instead of the standard C ++, and not for the managed C ++ version used for .Net.

+3
source share

It is important to understand the difference between native and managed code in Windows. There is a major discussion of this topic on SO here and a deeper immersion from Microsoft's man here .

Your concern about .Net Framework dependency may be outdated - new computers had to be installed by default since Vista and Windows 7 included it, and many of them would have it because of existing .Net applications or through Microsoft's Automatic Update - There is some information regarding the relative penetration rate of the .Net version here .

However, I would not choose C ++ / CLI if you do not have requirements for interacting with internal / managed code - use C ++ for native and C # for managed code.

+2
source share

In my opinion, the .NET framework only gives you high production speed, otherwise I hate it.

Use .Net when:

1 - you want production speed

2 - You are already working with a team that uses .Net

3 - You want portability (only between windows and supporting systems)

Use regular / native win32 programming when:

1 - wants more freedom

2 - wants more control over the system, and the program u will write

3 - have excess time

+1
source share

All Articles