User forums > Help
Problem Running C programs
(1/1)
Lamacide:
Recently I installed codeblocks for building of C programs, I did install with proper MinGW and path ' C:\Program Files (x86)\CodeBlocks\MinGW'
The problem I am having is when I build a new app in C and load just the hello world program I have red lines on any strings such as hello world
and, when I load the program it comes up with the proper black screen to attempt to show output, but the output of hello world never shows
and instead i get this
'Process returned 1974072457 (0x75A9F489) execution time : 0.395 s
Press any key to continue.'
after execution i get this message on build log ' Process terminated with status 1974072457 (0 minutes, 8 seconds)'
what is strange is it loads C++ hello world just fine.
Any info would be greatly appreciated I can't find anything online on this subject.
Lamacide:
here is the program just so you know it's not that there is no return 0; or main function problems
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Hello world!\n");
return 0;
}
ToApolytoXaos:
No need for <stdlib.h> btw...the first thing that comes in mind is the space I see in Program Files.
My windows setup is TDM's GCC and wxMSW-2.8.12 both installed in C:\ location for sake of safety. I have had issues with spaces in the past and decided to install it in root location. Besides, is often recommended in many places.
The awkward thing though is that C++ works just fine. Are you copying code from the web and pasting it in a C project and try to compile it? Possibly you carry hidden characters with such action.
stahta01:
Post full "build log". (do a re-build and post the build log after turning on Full logging)
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Tim S.
jarod42:
"red lines" come from spell cheker plugin: so configure it (with dictionary installation) or disable it.
Navigation
[0] Message Index
Go to full version