Re: STL on Solaris system



hi,
ischteuh@xxxxxxxxx wrote:
Hi everybody,

I would like compile a little program in c++

#include <iostream>

using namespace std;

int main()
{
cout << "coucou" << endl;
}

But there are few errors :

test.cpp:1:20: error: iostream: No such file or directory
test.cpp: In function 'int main()':
test.cpp:7: error: 'cout' was not declared in this scope
test.cpp:7: error: 'endl' was not declared in this scope

$> uname -a
SunOS 5.9 Generic_118558-17 sun4u sparc SUNW,Ultra-Enterprise

which compiler do you use?
Compiling with gcc 3.3 on solaris 9 works
[ewer@solperf:/users/trinomic/ewer]>cat te.cpp
#include <iostream>

using namespace std;

int main()
{
cout << "coucou" << endl;
}


[ewer@solperf:/users/trinomic/ewer]>g++ -o te te.cpp
[ewer@solperf:/users/trinomic/ewer]>te
coucou
[ewer@solperf:/users/trinomic/ewer]>g++ --version
g++ (GCC) 3.3
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Greetings Ewald
.



Relevant Pages