Code::Blocks Forums

User forums => Help => Topic started by: King_Pikmin on January 28, 2016, 07:47:33 pm

Title: [C] Cannot get any program to give output or work whatsoever
Post by: King_Pikmin on January 28, 2016, 07:47:33 pm
I installed CodeBlocks and the needed MinGW files. I made a new C console application, the default sample 'hello world' application. I build and run it without any errors, but an empty console will open up and nothing will ever be printed to it. Even if I close the program, the instance is still running and I have to kill it in task manager under 'processes'. I've restarted my computer, uninstalled and reinstalled CodeBlocks, but the same problem persists. Here is my code, it's the default code that was created when I made a new project:

Code
#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Hello world!\n");
    return 0;
}

Edit: I'm running Windows 7 64-bit.
Title: Re: [C] Cannot get any program to give output or work whatsoever
Post by: stahta01 on January 28, 2016, 08:19:54 pm
Post a full re-build log or I for one will ignore your post.

http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)

Edit: Also, check this FAQ http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28general%29#Q:_I_get_a_blank_.28black.29_terminal_window_on_windows (http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28general%29#Q:_I_get_a_blank_.28black.29_terminal_window_on_windows)

Tim S.
Title: Re: [C] Cannot get any program to give output or work whatsoever
Post by: King_Pikmin on January 28, 2016, 11:13:07 pm
Post a full re-build log or I for one will ignore your post.

http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)

Edit: Also, check this FAQ http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28general%29#Q:_I_get_a_blank_.28black.29_terminal_window_on_windows (http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28general%29#Q:_I_get_a_blank_.28black.29_terminal_window_on_windows)

Tim S.

Ahh, didn't think of disabling my antivirus. That has fixed it, thank you.