Hi there
I am having problems getting a successfully compiled/linked g++ program to run under Ubuntu linux.
A simple hello world program :
#include <iostream>
int main
(int argc,
char* argv[])
{
std::cout << "hello world\n";
return 0;
}
saved as helloworld.cpp
I execute the following command (from the same directory as the cpp file) with no errors or warnings displayed:
g++ helloworld.cpp -o t1
t1 is produced in the same directory.
However, I try to run it (just by typing t1 followed by carriage-return but it fails with:
bash: t1: command not found
Any ideas?
I am having problems getting a successfully compiled/linked g++ program to run under Ubuntu linux.
A simple hello world program :
#include <iostream>
int main
(int argc,
char* argv[])
{
std::cout << "hello world\n";
return 0;
}
saved as helloworld.cpp
I execute the following command (from the same directory as the cpp file) with no errors or warnings displayed:
g++ helloworld.cpp -o t1
t1 is produced in the same directory.
However, I try to run it (just by typing t1 followed by carriage-return but it fails with:
bash: t1: command not found
Any ideas?
Comment