Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Compiling a simple "hello world"

807575Nov 30 2005 — edited Jul 3 2007
Hello,

As this is my first experience using SunStudio, I wanted to fire it up with a pretty simple "hello world":
#include <iostream>

int main (void)
{
cout << "Hello world !" << endl;
return 0;
}
I try to build with a simple Makefile (a plain "simple executable"-wizard generated makefile.

It then fails with:

dmake -m serial -f "/export/home/grajea01/projets/test/Makefile"
CC -g -c -o Sun-sparc-Solaris/test1.o test1.cc
"test1.cc", line 15: Error:Info cout is not defined.
"test1.cc", line 15: Error:Info endl is not defined.
2 Error(s) detected.
*** Error code 2
dmake: Fatal error: Command failed for target `Sun-sparc-Solaris/test1.o'

Build Failed


----- BUT :

If I replace the #include <iostream>

#include <iostream.h>

It will compile, link and execute properly.

I installed SunStudio 11 (sparc) with the default options (ie: installing the patches, IDE, perf lib, etc).

... what am I missing here ???


Regards,

Jeff
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 31 2007
Added on Nov 30 2005
8 comments
148 views