Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Ubuntu Eclipse C++ Helloworld

I'm trying to run a Hello world C++ on Eclipse on Ubuntu 12.04. I installed g++ and wrote this code:

#include<vector>
#include<string>
#include <iostream>
using namespace std;
int main()
{
    cout << "Hello World" << endl;
    return 0;
}

Compile output:

**** Build of configuration Debug for project TopCoder ****

make all 
make: Nothing to be done for `all'.

**** Build Finished ****

Run output message:

Launching TopCoder has encountered a problem
Error starting process

Error starting process.
Exec_tty error:Cannot run program "/media/01CCE00FA6888D80/Achieve/Eclipse/TopCoder/Debug/TopCoder": Unknown reason
Exec_tty error:Cannot run program "/media/01CCE00FA6888D80/Achieve/Eclipse/TopCoder/Debug/TopCoder": Unknown reason
Exec_tty error:Cannot run program "/media/01CCE00FA6888D80/Achieve/Eclipse/TopCoder/Debug/TopCoder": Unknown reason

when I put the source code on ext4 drive it builds and run I changed

proc            /proc           proc    nodev,noexec,nosuid 0       0

in /etc/fstab to

proc            /proc           proc    dev,exec,suid 0       0

But no usefulness.

like image 869
RofaelEmil Avatar asked Dec 04 '25 15:12

RofaelEmil


1 Answers

You're tring to run an application from the /media/01CCE00FA6888D80 volume. Removable USB? The most likely culprit is noexec as an option to the default mount command line.

check if noexec is part of the options for mounting the filesystem using:

grep noexec /proc/mounts

if this results in output indicating that noexec is in effect for the file system then try:

sudo mount -o remount,exec /media/01CCE00FA6888D80

Also, if the removable volume is NTFS, your milage may vary.

like image 62
Petesh Avatar answered Dec 06 '25 05:12

Petesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!