Question:

Visual Studio 2005 Question?

by  |  earlier

0 LIKES UnLike

How can I compile a C++ program (even if it's only console) that will run without the .NET framework from the IDE (not using the command line method)?

 Tags:

   Report

5 ANSWERS


  1. You select start without debugging from the menu, like this:

    http://xoax.net/comp/cpp/console/Lesson1...

    These videos are 2003 and 2008 versions, but 2005 is pretty much the same.


  2. EDIT -

    <sigh>

    These .NET pseudocoders truly shouldn't be allowed near a computer.

    This is a very simple 'Hello World' console program:

    #include <windows.h>

    void __cdecl Startup(void);

    TCHAR hello[]="Hello world!";

    HANDLE hconsole;

    DWORD numwritten;

    __declspec (naked) void Startup(void)

    {

    hconsole=GetStdHandle (STD_OUTPUT_HANDLE);

    WriteConsole(hconsole, &hello, 12, &numwritten, 0);

    ExitProcess(0);

    }

    It does not require ANY stupid and unnecessary support files (e.g. MSVCRT.DLL, MSVC?80D.DLL, etc.), it does not use bloated & slow functions like printf(), and the .exe file is 2560 BYTES.  The actual code (minus the IAT) is >> 43 bytes << long.

    .NET pseudocoders don't have the intelligence to even make an efficient 'Hello World' program like the one shown here.  Any REAL Windows programmer could easily make a program like this and not end up with a bloated .exe file with extra memory wasted on support .dlls.

    --

    The MSVC++ 2005 pre-made console window is yet another example of Microsoft pushing their idiotic .NET garbage.

    I swear, this .NET c**p is a freaking VIRUS.  Thanks to all these MORONS these days who can't program worth a c**p, every Windows user has to have the bloated & slow .NET run-time files on their computer.

    If you want to get rid of .NET for making programs with the pre-made console window, you'll have to find some other compiler or an old compiler like Microsoft VC++ 6.0.

    Of course, even the old pre-made console has bloated, slow code in it, so it would be better to use the Windows API function calls for making console programs.  You don't need to use functions like 'scanf()' and c**p like that.

    If you don't know how to program with the Windows API, then you should get this book:

    http://www.microsoft.com/mspress/books/2...

    You should also download the Windows R2 Platform SDK.  It contains a reference of most of the Windows API function calls and it tells you how to create console programs.

    Creating  Windows programs with anything other than the Windows API produces incredibly bloated, slow code.

  3. Yes, but you can only do this if you are using C++ and obviously you then can't use any of the functionality provided by the framework (which sounds like what you are trying to do.)  Make sure you have CLR disabled in the build configuration.  You can also do it via the command line, but it sounds like you are already familiar with that approach.

    Good luck

  4. You cannot compile a .NET program to run on a system that does not have .NET installed. All VS 2005 programs are .NET programs.

  5. Try reinstalling Windows.

Question Stats

Latest activity: earlier.
This question has 5 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions