User forums > Help
Problem running and building projects
Rimdeker:
I have a very similar problem
I do not know why but for some reason I cannot compile things properly anymore.
Everything began this early morning, I tried to compile something but the default output window would not pop-up and there were no messages or anything in the build log. So , I restarted Code::Blocks and tried it again. Now the funny thing is if I click build&run it compiles but does not run, when I click on run then the program runs twice. Like, I quit the first instance a second instance of the program pops up (Like in OP's case). And another thing: If I try to compile AGAIN after that it does not compile but runs the first few lines of the program WITHIN the build log, then the build and run buttons are greyed out and I have to restart Code::Blocks.
I tried reinstalling and all but nothing helped, I don't really want to switch to another IDE, either. Code::Blocks seems to be the best free one available and I never had any problems with but this problem is driving me nuts.
Rimdeker:
--- Quote from: jens on August 10, 2009, 02:21:03 pm ---Please switch on full commandline logging:
change "Settings -> Compiler and debugger... -> Global compiler settings -> [the compiler you use] -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline",
then do a rebuild (clean and build not build and run) and post the output of the Build log,
then run the program from inside C::B and post the new output from the Build log.
--- End quote ---
I did as you said and got this for the first build:
mingw32-g++.exe -c "D:\Dokumente und Einstellungen\Rimdeker\Eigene Dateien\C++\Rimdeker.cpp" -o "D:\Dokumente und Einstellungen\Rimdeker\Eigene Dateien\C++\Rimdeker.o"
mingw32-g++.exe -o "D:\Dokumente und Einstellungen\Rimdeker\Eigene Dateien\C++\Rimdeker.exe" "D:\Dokumente und Einstellungen\Rimdeker\Eigene Dateien\C++\Rimdeker.o"
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings
Checking for existence: D:\Dokumente und Einstellungen\Rimdeker\Eigene Dateien\C++\Rimdeker.exe
Executing: D:\Programme\CodeBlocks/cb_console_runner.exe "D:\Dokumente und Einstellungen\Rimdeker\Eigene Dateien\C++\Rimdeker.exe" (in D:\Dokumente und Einstellungen\Rimdeker\Eigene Dateien\C++)
Process terminated with status 0 (0 minutes, 19 seconds)
I think that's totally okay but when I try to build it again or any other program I get this:
mingw32-g++.exe -c "D:\Dokumente und Einstellungen\Rimdeker\Eigene Dateien\C++\Rimdeker.cpp" -o "D:\Dokumente und Einstellungen\Rimdeker\Eigene Dateien\C++\Rimdeker.o"
Welcome to Hangman. Good Luck!
You have 8 incorrect guesses left.
You've used the following letters:
So far, the word is:
---------
Enter your guess:
Lol, those are the first lines of output of the program I was working on before this problem occured. Of cours, I cannot type in the build log and the build , run and buil&run buttons are greyed out and unclickable.
mau:
Good Night Everybody!
I'm having some issues with code blocks!
My code compiles in DEV, but not in code blocks... :(
It's a simple code:
#include <iostream>
using namespace std;
bool primo(int num){
for(int cont = 0; cont <= num/2; cont++){
if(num%cont == 0){
return false;
}
}
return true;
}
int main(){
if(!primo(1)){
cout<< "primo";
}
else
cout << "nao";
return 0;
}
And the return from code blocks is:
Process terminated with status -1073741676 (0 minutes, 3 seconds)
Can somebody give me some help about it?
ps: sorry about some language mistake, english is not spoken in my country!
Jenna:
--- Quote from: mau on August 20, 2009, 02:49:04 am ---Good Night Everybody!
I'm having some issues with code blocks!
My code compiles in DEV, but not in code blocks... :(
It's a simple code:
#include <iostream>
using namespace std;
bool primo(int num){
for(int cont = 0; cont <= num/2; cont++){
if(num%cont == 0){
return false;
}
}
return true;
}
int main(){
if(!primo(1)){
cout<< "primo";
}
else
cout << "nao";
return 0;
}
And the return from code blocks is:
Process terminated with status -1073741676 (0 minutes, 3 seconds)
Can somebody give me some help about it?
ps: sorry about some language mistake, english is not spoken in my country!
--- End quote ---
Please do not hijack threads, that have nothing to do with your problem !!
And be aware, that our forum is not a general programming forum, neither a mathmatical forum.
Your problem is mathmatical exception in the function primo, due to a logical (mathmatical) error.
That should be hint enough.
blueshake:
as jens said.it is nothing with codeblock.
when you pass 1 to primo,the cont is 0,
and in this statement,num%cont ,error rise up.
it is simple problem,if you do a debugger.
Navigation
[0] Message Index
[*] Previous page
Go to full version