Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create c++ programs without the requirement of .net framework to run (like ccleaner and utorrent)

i was wondering how programs like ccleaner and utorrent are made? AFAIK they are written in C++ but they run without the need of .net framework and apparently run on windows 98 as well. How can this be done? Visual c++ requires .net framework to be installed to run the binary file.

While .net framework is free, it can be a hassle and it would probably turn many users away as the setup is 20MB+ and installs several files/registry entries.

like image 465
luq Avatar asked Sep 26 '10 12:09

luq


2 Answers

Visual c++ requires .net framework to be installed to run the binary file.

No, it does not. In fact, C++ and the .NET framework are highly unrelated. You only need the .NET framework if your application is written in C++/CLI, which is far away from regular C++.

If you develop an application in standard C++, you don't need the .NET framework, just the runtime shipped with your toolchain (Visual C++, mingw, whatever). In some cases you can also link to the runtime statically, so you don't even need to distribute DLLs etc.

As for creating GUIs in regular C++, there are toolkits out there. Microsoft offers the bare Windows API, MFC, WTL and there are 3rd party products, like Qt or wxWidgets

like image 120
Jim Brissom Avatar answered Sep 19 '22 14:09

Jim Brissom


Create native C++ project, without using CLI. In VC++ Application Wizard you can select any type, except of CLI.

Native C++ project has its own runtime requirements: C/C++ runtime, MFC runtime (if MFC is used), but .NET Framework is not required.

like image 34
Alex F Avatar answered Sep 21 '22 14:09

Alex F