How to compile using VS2008, so .NET is not required for the binary?

I am trying to compile a very simple C application using VS2008. My problem is that the resulting binary requires systems to install .NET. No actual code within the project uses .NET functions, but I get runtime errors on any system that does not have .NET.

So, is there any compilation using VS2008 so that the resulting binary can work on a system without .NET?

+3
source share
4 answers

In the Project Properties dialog box, go to Configuration Properties | General. The "Common Language Runtime support" should be set to "No support for the duration of a regular language." Then rebuild.

EDIT . Also check the advanced linker options that start with the CLR. You should not see any / CLR * settings for these 3 items. If you use a manifest other than the standard, make sure it does not declare any CLR dependencies.

+3
source

C/++. " " Visual ++ . CLR - .NET(++/CLI), Win32 ( " " ) - C/++.

→ → Common Language.

Edit

, .NET, C. -DLL- → C/++ → → .

( , , , , , .;))

+3

As others have said, set the "Support for ordinary language time" setting to "No support for the duration of a regular language." You said you did not fix this, so .NET should not be a missing dependency. Check out the free Dependency Walker tool . This will show you all the libraries that your application depends on.

+1
source

Create a win32 console project.

0
source

Source: https://habr.com/ru/post/1710509/


All Articles