Hello. I am trying to compile, build and run some codes, but they just won't run. It can't be from a wrong code, because I even tried the main.cpp. Nothing worked. What should I do?
Hello. I am trying to compile, build and run some codes, but they just won't run. It can't be from a wrong code, because I even tried the main.cpp. Nothing worked. What should I do?
FAQ - CodeBlocks
Did you try turning "full Compiler logging" the directions in the link above?
Edit: If you have enable "full Compiler logging" what did Code::Blocks output?
Tim S.
Last edited by stahta01; 09-04-2011 at 10:59 AM.
Heh, excuse me... What is full compiler logging?
Okay, I put the cin.get(); (I hadn't thought of that, even than I knew about it) but it still won't build. When I build or "build and run", it does nothing, and if I try run, it says "It seems that your program hasn't been built yet. Do you want to build it now?" and if I press Yes, it still does nothing.
What link?
Last edited by Coga1900; 09-04-2011 at 11:33 AM.
I have a suspicion that you only installed the ide, not the compiler, if on windows.Okay, I put the cin.get(); (I hadn't thought of that, even than I knew about it) but it still won't build. When I build or "build and run", it does nothing, and if I try run, it says "It seems that your program hasn't been built yet. Do you want to build it now?" and if I press Yes, it still does nothing.
This link "http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_co mpiler_problem.3F"
http://wiki.codeblocks.org/index.php...ler_problem.3F
Last edited by stahta01; 09-04-2011 at 01:10 PM.
I tried it, but it still does the same. But this time, when I press No, it gets a program window that says that it returned 0 value! I know that I'm tiring you, but I'm tired of all this, too!
That is your program running ! Put in some output statements to see what happens.it gets a program window that says that it returned 0 value!
If you get tired of this, wonder what you'll do in future, facing segfaults !
You don't get it. It returns 0 value, but it gets no text! There is a cout, but it only returns the value! Nothing else!
Your reasoning does not follow: just because a file is named "main.cpp" does not mean that it is immune from containing "wrong code".Originally Posted by Coga1900
Have you ever successfully compiled and run a program using Code::Blocks? If not, create a new project and attempt to compile and run this program:
Then tell us what happened.Code:#include <iostream> int main() { std::cout << "Hello world!" << std::endl; }
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
That is the main.cpp!!!! It does nothing!
You are not telling the truth because...Originally Posted by Coga1900
My example prints "Hello world!"Originally Posted by Coga1900
Obviously, you did not take my advice. I told you to create a new project. You don't have to do that if you can confirm that you have successfully used your IDE to build a C++ program, but you neglected to say anything about that.
Basically, I am trying to rule out possible problems. Your failure to cooperate is just costing you time.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)