How to compile C file using Sublime Text in Windows 8.1 64 bit?

6

I installed Sublime Text in Windows 8.1 64 bit.

How to compile a * .c file through Sublime in Windows?

Is it necessary to install a compiler and / or another program to alert code errors and create the executable file so that I can test the program? If yes, what are the most recommended programs [light; practical; stable]?

    
asked by anonymous 01.02.2014 / 23:12

1 answer

6

Resolved !!

Follow these steps in this link: link

1: Download the latest version of MinGW

2: Preferably install it in C: / MinGW . I installed the mingw32-base and mingw32-gcc-g ++ packages (I'm not sure if it's essential to install these two packages)

3: Locate the bin path ( C: / MinGW / bin )

4: Windows + F - > Settings - > type system environment - > Edit System Environment Variables or right click on My Computer - > Properties - > System - > Advanced - > Environment Variables

5: In the user variables, click New . In the name put MinGW , already in the value put the path of the bin folder (third step), eg C: \ MinGW \ bin . Give Ok, then OK again.

6: Open Sublime Text. Go to Tools - > Build System - > C ++

7: Ctrl + B to compile and Ctrl + Shift + B to run

NOTE: Save all files in the bin folder without placing them in a folder . The file path should be in this format: C: /MinGW/bin/File.cpp

It worked! : D

    
01.02.2014 / 23:58