C++ Hello World

Troubleshooting with your custom scripts/programs installed on Polarhome.

Moderator: Moderators

C++ Hello World

Postby dillona_aix » Thu Sep 22, 2005 11:43 pm

I wrote a simple "hello world" program and it wont compile. The source is as follows:
bash-2.04$ cat hello.cpp
#include <iostream.h>
cout << "Hello World!";
return 0;

I execute "gcc hello.cpp" and get the following error:
gcc hello.cpp
ld: 0711-317 ERROR: Undefined symbol: cout
ld: 0711-317 ERROR: Undefined symbol: .ostream::operator<<(char const *)
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
There are 10 types of people in this world, those who understand binary and those who don't.
User avatar
Posts: 185
Joined: Sun Sep 11, 2005 9:05 pm
Location: USA

Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 2 guests