Code::Blocks Forums
User forums => Help => Topic started by: kristiqn1104 on November 13, 2015, 12:26:13 am
-
Hello,
I am using Code::Blocks since september without any problems until several days ago. When I try to compile a simple C code I am facing a very annoying problem. The execution screen is blank , empty no any output , yes I checked my code and it's 100% correct.
I am new to C programming, computer languages , compilers and I don't know how to proceed. At university I work on Unix(university's pc) and at home I am using Windows 10 64 laptop . I installed the binary release of Code::Blocks which includes the GCC compiler, toolchain executables are auto-detected ( correctly ) .I did a reset of the compiler to default , I reinstalled Code::Blocks several times, changed the directory to another hard drive, I deleted all files of Code::Blocks including those in hidden AppData folder, but nothing worked.
I really like Code::Blocks and I want to continue study C language on it , I have so many projects to do for december but I've stucked.
Any suggections? :o
I am getting the following message in C::B Build log:
mingw32-gcc.exe -c E:\INF111\maison\Cprogramming\Enclasse.c -o E:\INF111\maison\Cprogramming\Enclasse.o
mingw32-g++.exe -o E:\INF111\maison\Cprogramming\Enclasse.exe E:\INF111\maison\Cprogramming\Enclasse.o
Process terminated with status 0 (0 minute(s), 1 second(s))
0 error(s), 0 warning(s) (0 minute(s), 1 second(s))
Checking for existence: E:\INF111\maison\Cprogramming\Enclasse.exe
Executing: E:\CodeBlocks/cb_console_runner.exe "E:\INF111\maison\Cprogramming\Enclasse.exe" (in E:\INF111\maison\Cprogramming)
In my opinion there is nothing with the code , everything looks fine but for some reason the GCC compiler is not working properly. I don't understand how problems like this could occur when all the settings and options are set to default when I install C::B. I never changed anything in the options that I don't understand because I know I can mess something up. It's strange that after so many compiled C codes succesfully , the compiler got broken by itself.
Thank You in advance!
-
Did you try to run Enclasse.exe in command window (cmd.exe)? If yes, does it behave correctly?
-
Please, it's good to know which version of C:B you are using.
In Project->Properties->Build targets what 'Type' do you have, GUI aplication? Console aplication?
Can you run your app with the debugger, step by step, so you can tell where your app 'fails'?
-
My Code::Blocks version is 13.12. It is console application. After I ran it with the debugger I got this error :
-------------- Build: Debug in INF111 (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -o bin\Debug\INF111.exe obj\Debug\main.o
e:/codeblocks/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot open output file bin\Debug\INF111.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Code::Blocks has full permissions, why is that?
-
Two possible causes:
1. the exe is still running
2. there is an anti virus software that causes this.
-
I checked in processes , the file is closed. The shields of my antivirus software are disabled.
-
I checked in processes , the file is closed. The shields of my antivirus software are disabled.
have you tried to run it in the cmd?
If you don't know how:
#1
1) Go to your output folder
2) Press and hold shift an right klick -> Open command prompt window here
3) Type the name of your exe and hit enter
Does it work?
if step 2) in #1 does not work:
1) click "start", type in the search bar "cmd.exe" and hit enter
2) enter "cd .." and hit enter. repeat this step until there is only written "C:\>"
3) Now change partition with: type "E:" and hit enter
4) now go with "cd" (=change directory) to your folder. In your example: "cd INF111\maison\Cprogramming\" (Note you can hit the TAB key for completion of folder names)
5) Type the name of your exe and hit enter
Does it work?
PS. i have written this noobie explanation, because i plan to link my future descriptions of this steps to this post.
-
The shields of my antivirus software are disabled.
What av are you using?
-
None of #1 and #2 worked. When I run the exe in the cmd it still give no any output. I have Avast installed on my pc.
-
avast started lately to block executables generated by gcc, so probably avast has blocked the creation and execution of your file.
So i would try to:
1) deactivate avast
2) Open codeblocks and rebuild the project
3) try to run it
If this does not work:
1) add your project directory, the codeblocks directory and the mingw directory to the exception of avast
2) rebuild your project
If all this does not work:
post a rebuild log here in the forum and post some code...
greetings
-
I have registered to say that I too was suffering from a similar problem.
It also manifested in that after closing the window the program was still active preventing modifications to the excutables but left old programs unafected(which had been run before and were excluded from Deep Scan).
Going to Avast's options and turning Deep Scan off and on fixed the problem for me (I was unpluged from the internet but I don't think that matters).
Edit: The problem came back but I can add files to the Deep Screen exclusions.