473,379 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

error running hello world

thanks for helping with this problem

I am getting errors starting with

fred@debian:~/myPrograms/cpp/practice$ make
cc hello.cpp
/tmp/ccQzQfGH.o: In function `main':
hello.cpp:(.text+0x27): undefined reference to `std::cout'

**************** the program ****************
#include <iostream>
using namespace std;

int main() {
cout << "Hello, World! I am "
<< 8 << " Today!" << endl;
return 0;
}
************************************************

**************** the make file ****************
hello: hello.o
cc hello.cpp
***********************************************
Jul 19 '06 #1
3 1439
Gary Wessle wrote:
thanks for helping with this problem

I am getting errors starting with

fred@debian:~/myPrograms/cpp/practice$ make
cc hello.cpp
/tmp/ccQzQfGH.o: In function `main':
hello.cpp:(.text+0x27): undefined reference to `std::cout'
Try compiling it with a C++ compiler rather an a C compiler.

--
Ian Collins.
Jul 19 '06 #2
Ian Collins <ia******@hotmail.comwrites:
Gary Wessle wrote:
thanks for helping with this problem

I am getting errors starting with

fred@debian:~/myPrograms/cpp/practice$ make
cc hello.cpp
/tmp/ccQzQfGH.o: In function `main':
hello.cpp:(.text+0x27): undefined reference to `std::cout'
Try compiling it with a C++ compiler rather an a C compiler.

--
Ian Collins.
thanks
it now compiles but when I run it

************************************************** **************
fred@debian:~/myPrograms/cpp/practice$ ls
a.out hello.cpp hello.o makefile semantic.cache
fred@debian:~/myPrograms/cpp/practice$ a.out
bash: a.out: command not found
************************************************** **************
Jul 19 '06 #3
Gary Wessle schrieb:
Ian Collins <ia******@hotmail.comwrites:
>Gary Wessle wrote:
>>thanks for helping with this problem

I am getting errors starting with

fred@debian:~/myPrograms/cpp/practice$ make
cc hello.cpp
/tmp/ccQzQfGH.o: In function `main':
hello.cpp:(.text+0x27): undefined reference to `std::cout'
Try compiling it with a C++ compiler rather an a C compiler.

--
Ian Collins.

thanks
it now compiles but when I run it

************************************************** **************
fred@debian:~/myPrograms/cpp/practice$ ls
a.out hello.cpp hello.o makefile semantic.cache
fred@debian:~/myPrograms/cpp/practice$ a.out
bash: a.out: command not found
************************************************** **************
The current directory (called ".") is not in your path.

Try:
../a.out

Well, tools and operation systems are offtopic here.
You need to read a good book about Linux.

--
Thomas
Jul 19 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: charliek | last post by:
I have mod_python 2.7.10 running with python 2.3.4 and am getting an odd error. The error is happening on the production machine, and not on my development machine. I am using the publisher...
1
by: qwejohn | last post by:
Hello, I had posted this question in the twisted mailing list but did not got a solution ; I hope that the python Gurus of this forum can help me a bit. I am trying the exmaple in the python...
2
by: GitarJake | last post by:
Hello all, I am trying to test an ODBC connection to an Oracle dbf using the ODBC Data Source Administrator. It's not working and I suspect I haven't configured Oracle correctly. Below is...
0
by: Don Stevic | last post by:
I am running VS2005 and using VSTO for Word. I keep getting this error saying that there is no source code available for this location when I try and run this application. I am going to...
2
by: lu1219 | last post by:
I am currently running IIS 5.1, Windows XP Pro with service pack 2. When I try to run an ASP page I get an error saying that 403.1 Execut Access Forbidden - IIS. There are no firewalls up and...
1
by: Keith | last post by:
All, I have been told this is an ASP.NET issue and not an IIS issue, so I am posting this here. I have a problem with ASP.NET returning an HTTP 500 error when trying to run ASPX pages on...
2
by: spam1 | last post by:
Hi all, I'm not new to ASP.NET but I'm trying to get a simple Hello World page going on IIS 6.0 on Windows 2003. I'm connecting from the local machine. It comes back with the standard "The...
10
by: DaveS | last post by:
I've been trying to start out learning some ASP and I've been trying to create the classic 'Hello world' program. I'm running the ASP pages on some webspace I have, rather than on my computer....
15
by: David Pratt | last post by:
I recently replied to MC felons post on returning strings and was in error on what I was trying to do. After running completely thru my code, I did find that I was misunderstanding how C++ works...
0
by: tosreejithp | last post by:
Hi, My first problem was i am not able to compiled a file from java script to java class.Now its clear and working fine..now i can convert a java script file to java class by Rhino Java Script...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.