#include <iostream>
using namespace std;
void main()
{
cout << "test" << endl;
}
[root@dragonserver /root]# gcc test.cpp
/tmp/ccRssB00.o: In function `main':
/tmp/ccRssB00.o(.text+0xa): undefined reference to `endl(ostream &)'
/tmp/ccRssB00.o(.text+0x17): undefined reference to `cout'
/tmp/ccRssB00.o(.text+0x1c): undefined reference to `ostream::operator<<(char const *D'
/tmp/ccRssB00.o(.text+0x2a): undefined reference to `ostream::operator<<(ostream &(*D(ostream &))'
collect2: ld returned 1 exit status
Wat doe ik verkeerd ?
using namespace std;
void main()
{
cout << "test" << endl;
}
[root@dragonserver /root]# gcc test.cpp
/tmp/ccRssB00.o: In function `main':
/tmp/ccRssB00.o(.text+0xa): undefined reference to `endl(ostream &)'
/tmp/ccRssB00.o(.text+0x17): undefined reference to `cout'
/tmp/ccRssB00.o(.text+0x1c): undefined reference to `ostream::operator<<(char const *D'
/tmp/ccRssB00.o(.text+0x2a): undefined reference to `ostream::operator<<(ostream &(*D(ostream &))'
collect2: ld returned 1 exit status
Wat doe ik verkeerd ?