Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: cbusername on February 21, 2013, 02:31:45 pm
-
default program is not working. It shows no error, but does not output.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!" << endl;
return 0;
}
-
Do you check the 'pause when execution ends' in build target options ?
-
In build options there is no 'pause when execution end' option. that is 'build option' in global compiler settings. Still not working.
-
My apologies. I found build target option and 'pause when execution ends' was checked.
I unchecked it and tried, but I am getting the same problem.
-
Right-click on your project, click 'Properties...'
click on the 'Build target' tab
check that the checkbox 'pause when execution ends' is checked for each build target (Debug/Release).
What does happen if you launch your executable from cmd line ?
-
'Pause when execution ends' is checked for both debug and release. Program is not running from cmd line. I tried Program1 (which is the name of the project) from the directory where it is and it says access denied.
-
Where is the exe ? is it a special directory ?
Which permission has the exe ? (if on *nix, which is your umask value ?)...
-
it is in c:users/orindombanerjee/desktop/bin/debug
orindom banerjee is my name.
-
c:\users\orindombanerjee\desktop\bin\debug
no special directory. It stored it there by default.
-
I would says that Desktop is a special directory...
- Try to copy and run your exe from another directory (Or change output directory in C::B)
- Check if you can run an other executable in the "problematic" directory.
- Look at Software Restriction Policy (SRP) in the user's Group Policy Object (GPO) if something blocks it.
So it is not a C::B issue, but your OS which forbids to launch your exe....
-
it doesn't work from c:\ either, where i copied it. It still says access denied after long pause
there's no other program i know as i am just begining
i know nothing about SRP and GPO, need guidance
It might not be my os issue as devc++ is working fine.
-
it doesn't work from c:\ either, where i copied it. It still says access denied after long pause
there's no other program i know as i am just begining
i know nothing about SRP and GPO, need guidance
It might not be my os issue as devc++ is working fine.
WARNING: The root drive (C:\) is a Special Folders in Windows 7!!
I suggest trying "c:\users\orindombanerjee" and make sure your anti-virus software is not the issue.
Also read the FAQs at least this one http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)
Tim S.
-
hi,
I had the same problem but then when that got solved this doesn't work:
#include <iostream>
using namespace std;
int main()
{
int tag = 9;
cout << tag;
return 0;
}
but this works:
#include <iostream>
using namespace std;
int main()
{
int tag = 9;
cout << "value" << tag;
return 0;
}
How bizaare! Can someone please help. I am not able to progress as I need codeblocks for c++. Its working fine in devc++.
-
When posting code, please use [code][/code] tags.
Both code snippets you provided work as expected for me. However, as I am unsure what you mean by "doesn't work", I cannot further diagnose.
(Also, have you gone through everything in the FAQ entry posted by stahta01?)
-
Compiler- and programerrors related question violate our forum rules.
Topic locked !