Click here to Skip to main content
15,920,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new (Day 2) and of course already can't solve this problem!!!! I am using "C++ For Dummies 3rd edition" and the first... VERY FIRST project and I already have a problem. Every time I try to build and run

C++
#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}



It Returns

-------------- Run: Debug in SayHello (compiler: GNU GCC Compiler)---------------

Checking for existence: /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/bin/Debug/SayHello
Executing: xterm -T SayHello -e /usr/bin/cb_console_runner LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/bin/Debug/SayHello  (in /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/.)
Process terminated with status -1 (0 minute(s), 0 second(s))



And it won't run. I use Linux PLEASE HELP!

(EDIT)

I ran and debug and I also got this information if it is helpful:

Building to ensure sources are up-to-date
Selecting target: 
Debug
Adding source dir: /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/
Adding source dir: /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/
Adding file: /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/bin/Debug/SayHello
Changing directory to: /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/.
Set variable: LD_LIBRARY_PATH=.:
Starting debugger: /usr/bin/gdb -nx -fullname  -quiet  -args /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/bin/Debug/SayHello
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Can't launch console (xterm -T 'Program Console' -e sleep 80031434)
Debugger name and version: GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
[Inferior 1 (process 32030) exited normally]
Debugger finished with status 0
Selecting target: 
Debug
Adding source dir: /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/
Adding source dir: /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/
Adding file: /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/bin/Debug/SayHello
Changing directory to: /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/.
Set variable: LD_LIBRARY_PATH=.:
Starting debugger: /usr/bin/gdb -nx -fullname  -quiet  -args /home/coldavian/C++/CPP_AIO/BookI/Chapter02/SayHello/bin/Debug/SayHello
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Can't launch console (xterm -T 'Program Console' -e sleep 80031434)
Debugger name and version: GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
[Inferior 1 (process 32037) exited normally]
Debugger finished with status 0


What I have tried:

Restarting, following all steps. Searching Google! (Found Nothing)
Posted
Updated 26-Aug-16 15:29pm
v2
Comments
Richard MacCutchan 19-Jul-16 3:41am    
Can't launch console (xterm -T 'Program Console' -e sleep 80031434)
That looks to be the problem. Try running it in a simple console window.
Cold Avian 19-Jul-16 14:41pm    
Thank You!! I just had to type in console:
sudo apt-get install xterm
KarstenK 20-Jul-16 12:54pm    
Programming is like a hurdle run. The real problems occur when the hurdle is too high. Learn to fight them down. ;-)

I have gotten so far into coding and its only been since July 16! I have already decided to take it on as a career! Thanks for helping me with my first problem ;p ! Good luck to all

SOLUTION IS TO INSTALL XTERM
Terminal it uses :p or just change it to what you want in settings
 
Share this answer
 
v2
I have gotten so far into coding and its only been since July 16! I have already decided to take it on as a career! Thanks for helping me with my first problem ;p ! Good luck to all
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900