User forums > Help

[C] Cannot get any program to give output or work whatsoever

(1/1)

King_Pikmin:
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;
}

--- End code ---

Edit: I'm running Windows 7 64-bit.

stahta01:
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

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

Tim S.

King_Pikmin:

--- Quote from: 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

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

Tim S.

--- End quote ---

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

Navigation

[0] Message Index

Go to full version