It is recommended to use the compiler that is ISO/IEC C/C++ complied and install any patches or updates or Service Pack for the compiler. Compilers also have bugs????
1. Launch the Microsoft Visual C++ from the Start → Programs… or from wherever the shortcut is.
2. From the Visual C++ IDE, selectFile menu thenNew sub menu. The following dialog box appears.
|
| |
| |
| |
| |
| |
| |
| |
Creating a Windows executable file
All program examples intenouk.com are built in Debug mode. To create a Release Mode version we have to change the Visual C++ project to a Release Mode. After rebuilding the program, the executable should be portable on Windows machine. To run the program at the command prompt from any relative path you can include the executable under the%root%\system32 directory. Let take another simple program example (this is for win32 console mode application). We write, compile and link the following program as mentioned in the previous steps.
| |
From the Debug Mode we change it to the Release Mode. The steps:
Click the Build menu → Set Active Configuration… sub menu. | |
From the following box, select the win32prog – Win32 Release (win32prog should be your project name). Then click OK button. | |
If there any other settings that you want to change such as optimization etc., change it through the project Setting menu as shown below. | |
| |
Then rebuild (compile and link) your program. Make sure there is no error. The executable should be a Release version. Finally you can copy the executable manually from your project folder. An example is shown below. | |
Then, to run the program at any relative path of the command prompt, for Win 2000 server, we put it under the C:\WINNT\system32\ directory. An example of running our previous program at any relative path of the command prompt, after the executable was copied to C:\WINNT\system32\ folder is shown below. |
---www.tenouk.com---
Further digging:
Microsoft C references, online MSDN.
Microsoft Visual C++, online MSDN.
ReactOS - Windows binary compatible OS - C/C++ source code repository, Doxygen.