C Create Application Console

 

- Info:

- This tutorial shows how to create "C Console Application" using different compilers and tools.

- Console Application uses Text User Interface.

 

- MinGW Compiler:

- Create C:\Temp\Test.c

- Start MSDOS

- cd C:\Temp

- gcc Test.c -o Test.exe

- Test.exe

 

- Microsoft Compiler:

- Create C:\Temp\Test.c

- MSDOS

- cd C:\Temp

- cl Test.c user32.lib kernel32.lib

- Test.exe

 

- Microsoft Visual Studio 2008:

- File New Project ... Visual C++ General Empty Project Name: MyProject OK

- RC on Source Files Add New Item... Code C++ File (.cpp) Name: Test.c Add Paste Test.c

- RC on Test.c Properties Configuration Properties C/C++ Advanced Compile As: Compile as C Code (/TC)

- Start Without Debugging Ctrl+F5

 

Test.c

#include <stdio.h>

int main () {

printf("Hello World!\n");

return 0;

}