E
Eugene A
Hello.
I am trying to compile a linux socket server and a client in cygwin on
windows. The g++ version is 3.3.1. The source was obtained from this
location:
http://www.linuxgazette.com/issue74/tougher.html
ServerSoccket.cpp apparently compiles OK. Socket.cpp has a problem. Here's
my output:
$ make -f Makefile.txt
g++ -c -o ServerSocket.o ServerSocket.cpp
g++ -c -o Socket.o Socket.cpp
Socket.cpp: In member function `int Socket::recv(std::string&) const':
Socket.cpp:135: error: `cout' undeclared in namespace `std'
Socket.cpp: In member function `bool Socket::connect(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, int)':
Socket.cpp:158: error: `inet_pton' undeclared (first use this function)
Socket.cpp:158: error: (Each undeclared identifier is reported only once for
each function it appears in.)
make: *** [Socket.o] Error 1
How can cout be undeclared in C++? Isnt that one of the basic basics?
Please help,
Eugene.
I am trying to compile a linux socket server and a client in cygwin on
windows. The g++ version is 3.3.1. The source was obtained from this
location:
http://www.linuxgazette.com/issue74/tougher.html
ServerSoccket.cpp apparently compiles OK. Socket.cpp has a problem. Here's
my output:
$ make -f Makefile.txt
g++ -c -o ServerSocket.o ServerSocket.cpp
g++ -c -o Socket.o Socket.cpp
Socket.cpp: In member function `int Socket::recv(std::string&) const':
Socket.cpp:135: error: `cout' undeclared in namespace `std'
Socket.cpp: In member function `bool Socket::connect(std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, int)':
Socket.cpp:158: error: `inet_pton' undeclared (first use this function)
Socket.cpp:158: error: (Each undeclared identifier is reported only once for
each function it appears in.)
make: *** [Socket.o] Error 1
How can cout be undeclared in C++? Isnt that one of the basic basics?
Please help,
Eugene.