I dont understand, im starting out learning C, ive just installed visual studio and im following a hello world tutorial:
Im creating a win32 console application and my code is:
Yet when I try to compile it says:Code:/* Author: Your name Date: yyyy/mm/dd Description: Writes the words "Hello World" on the screen */ #include<stdio.h> #include "stdafx.h" int main() { printf("Hello World\n"); //prints "Hello World" return 0; }
"Error spawning rc.exe"
Does the rc.exe file exist? The most common problem I see from this error is that executable isn't available.
okay visual C++ is a hard compiler to use and i thort i would start to learn C untill i was told to learn C++ since its better and more powerfull im using Dev C++ if i was you what i would do is download Dev C++ and start a new project *console app* and write the hello world like this
Code:#include <iostream> using namespace std; int main() { cout <<"Hello World" << endl; // this displays Hello world system("PAUSE"); // got to add this to make console stay up in Dev C++ return 0; }
I will use a GNU C compiler rather than windows visual C++ but of course it depends what application you are going to develop and what platform
Or u can download the tiny c compiler (tcc) which does not have a gui but would compile any standard c program. If you like the idea of working with an ide you should probably go with shadowhound's idea and get dev c++ which is a c and c++ compiler. This compiler is easy to set up and fairly easy to use, especially for beginners like you and I.
The GNU C Compiler's rise to fame is partly based on its standards compatibility. You can get it on Windows too if you want - it's not too hard if I remember.
There are two methods:
MinGW | Minimalist GNU for Windows
DJGPP
They are quite different, if I remember correctly, but they should both achieve what you need.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks