| View previous topic :: View next topic |
| Author |
Message |
misterdanny
Joined: 26 Jun 2009 Posts: 4
|
Posted: Thu Jul 23, 2009 3:31 am Post subject: I can "debug" my project, but I can't run it.... |
|
|
I am running windows, using netbeans 6.7. I just installed the netbeans c/c++ plugin according to this tutorial. http://www.netbeans.org/community/releases/67/cpp-setup-instructions.html
I installed mingw for my compiler. I followed the instructions letter for letter..
I am now trying to compile and run this code..
| Code: |
#include <iostream>
int main() {
std::cout << "Test" << std::endl;
char c;
std::cin >> c;
return 0;
}
|
I am able to build the project, however whenever I press run, I get a command prompt screen that shows this:
| Code: |
C:/Users/Danny/AppData/Local/Temp/dlight8444146697431806377termexec.env: line 1:
syntax error near unexpected token `('
C:/Users/Danny/AppData/Local/Temp/dlight8444146697431806377termexec.env: line 1:
`PATH=/bin:/usr/bin::/C/Windows/system32:/C/Windows:/C/Windows/System32/Wbem:/C
/Windows/System32/WindowsPowerShell/v1.0/:/C/Program\ Files\ (x86)/ATI\ Technolo
gies/ATI.ACE/Core-Static:/C/Program\ Files\ (x86)/Common\ Files/Intuit/QBPOSSDKR
untime:/C/Program\ Files\ (x86)/php:/C/Program\ Files/MySQL/MySQL\ Server\ 5.1/b
in:/C/Program\ Files\ (x86)/Common\ Files/Adobe/AGL:/C/Program\ Files\ (x86)/Jav
a/jdk1.6.0_14/bin:/C/MinGW/bin: && export PATH'
Press [Enter] to close the terminal ...
|
the "run" console in netbeans reads
| Code: |
Process is started in an external terminal ...
RUN FAILED (exit value 1, total time: 54ms)
|
However, if I choose debug isntead of run, it seems to work...
the command prompt reads
| Code: |
Launching
User program running
User program running
User program running
User program finished
|
I can't seem to figure out what is going on here...
(when I go to tools->options->c/c++, all of the fields are filled out correctly, except that it says fortan compiler is missing or invalid, which isn't the problem) |
|
| Back to top |
|
 |
Andrew Krasny Posted via mailing list.
|
Posted: Thu Jul 23, 2009 9:26 am Post subject: I can "debug" my project, but I can't run it.... |
|
|
misterdanny,
this a known problem and it should be fixed in patch1. So the advice
would be to use current development version or wait for patch 1.
With your version, could you, please try run your project with "Output
Window" option (Properties->Run->Console Type).
Thanks,
=Andrew
23.07.09 07:32, misterdanny::
| Quote: | I am running windows, using netbeans 6.7. I just installed netbeans. I just installed the c/c++ plugin according to this tutorial. http://www.netbeans.org/community/releases/67/cpp-setup-instructions.html
I installed mingw for my compiler. I followed the instructions letter for letter..
I am trying to compile and run this code..
Code:
#include <iostream>
int main() {
std::cout << "Test" << std::endl;
char c;
std::cin >> c;
return 0;
}
I am able to build the project, however whenever I press run, I get a command prompt screen that shows this:
Code:
C:/Users/Danny/AppData/Local/Temp/dlight8444146697431806377termexec.env: line 1:
syntax error near unexpected token `('
C:/Users/Danny/AppData/Local/Temp/dlight8444146697431806377termexec.env: line 1:
`PATH=/bin:/usr/bin::/C/Windows/system32:/C/Windows:/C/Windows/System32/Wbem:/C
/Windows/System32/WindowsPowerShell/v1.0/:/C/Program\ Files\ (x86)/ATI\ Technolo
gies/ATI.ACE/Core-Static:/C/Program\ Files\ (x86)/Common\ Files/Intuit/QBPOSSDKR
untime:/C/Program\ Files\ (x86)/php:/C/Program\ Files/MySQL/MySQL\ Server\ 5.1/b
in:/C/Program\ Files\ (x86)/Common\ Files/Adobe/AGL:/C/Program\ Files\ (x86)/Jav
a/jdk1.6.0_14/bin:/C/MinGW/bin: && export PATH'
Press [Enter] to close the terminal ...
the "run" console in netbeans reads
Code:
Process is started in an external terminal ...
RUN FAILED (exit value 1, total time: 54ms)
However, if I choose debug isntead of run, it seems to work...
the command prompt reads
Code:
Test
Code:
Launching
User program running
User program running
User program running
User program finished
I can't seem to figure out what is going on here...
(when I go to tools->options->c/c++, all of the fields are filled out correctly, except that it says fortan compiler is missing or invalid, which isn't the problem)
|
|
|
| Back to top |
|
 |
misterdanny
Joined: 26 Jun 2009 Posts: 4
|
Posted: Thu Jul 23, 2009 4:39 pm Post subject: |
|
|
| Ah that seems to have fixed the problem. thanks! |
|
| Back to top |
|
 |
nullimage
Joined: 31 Aug 2009 Posts: 1
|
Posted: Mon Aug 31, 2009 2:32 pm Post subject: same problem |
|
|
Hi, I'm having the exact same problem only i'm using version 6.7.1, I've tried changing the console to "output window" and this "sort of" works.
However, using the "output window" when I place an input instruction (scanf, etc) any previous outputted text won't show until after I enter a value, and then it spits out all the previous output...
For example, with this code:
| Quote: | int main(int argc, char**argv) {
int i;
printf("Test program\n");
printf("Input a number:");
scanf("%i",&i);
printf("\nYour number was: %i",i);
return 0;
} |
I get a blank window, and only after typing a value and pressing enter does the text appear:
| Quote: | 2
Test program
Input a number:
Your number was: 2
RUN SUCCESSFUL (total time: 2s) |
Any help would be appreciated. |
|
| Back to top |
|
 |
josue.barroso
Joined: 23 Oct 2009 Posts: 3
|
Posted: Fri Oct 23, 2009 2:13 am Post subject: |
|
|
I'm having the same problem
Version 6.7.1 too
And I agree with nullimage
That fix is a problem when the program depends on the console for I/O
What we can do? When will it get fixed? |
|
| Back to top |
|
 |
Leonid Lenyashin Posted via mailing list.
|
Posted: Fri Oct 23, 2009 7:30 am Post subject: I can "debug" my project, but I can't run it.... |
|
|
Try to go into project properties and turn off "Profile on Run" option.
It might help.
josue.barroso wrote:
| Quote: | I'm having the same problem
Version 6.7.1 too
And I agree with nullimage
That fix is a problem when the program depends on the console for I/O
What we can do? When will it get fixed?
|
|
|
| Back to top |
|
 |
josue.barroso
Joined: 23 Oct 2009 Posts: 3
|
Posted: Sun Oct 25, 2009 2:18 pm Post subject: Problem Solved! |
|
|
Thx very much Leonid Lenyashin!
It worked in both modes: External Terminal and Output Window!!!
 |
|
| Back to top |
|
 |
Leonid Lenyashin Posted via mailing list.
|
Posted: Sun Oct 25, 2009 8:12 pm Post subject: I can "debug" my project, but I can't run it.... |
|
|
I'd appreciate you file a bug even if you have no problem now. The most
important information is your platform and your toolchain.
josue.barroso wrote:
| Quote: | Thx very much Leonid Lenyashin!
It worked in both modes: External Terminal and Output Window!!!
:P
|
|
|
| Back to top |
|
 |
josue.barroso
Joined: 23 Oct 2009 Posts: 3
|
Posted: Tue Oct 27, 2009 11:16 am Post subject: |
|
|
My platform is Windows Vista 32bits
I'm using the MinGW toolchain
But how can I file a bug? |
|
| Back to top |
|
 |
Leonid Lenyashin Posted via mailing list.
|
Posted: Tue Oct 27, 2009 3:11 pm Post subject: I can "debug" my project, but I can't run it.... |
|
|
Go here:
http://www.netbeans.org/issues/enter_bug.cgi?component=cnd
You'll need to be registered in the Issuezilla.
josue.barroso wrote:
| Quote: | My platform is Windows Vista 32bits
I'm using the MinGW toolchain
But how can I file a bug?
|
|
|
| Back to top |
|
 |
|