im trying to compile a c++ application (that uses sockets) with codelite + mingw (os: windows). im also a newbie with C++ i hope you can help me with this.
return ::write(fd, theData, theLen);
C:/Program Files/CodeLite/h264_C++/os.cpp:32: error: '::write' has not been declared
cout << "Failed to resolve " << theServer.c_str() << ": " << hstrerror (h_errno) << endl;
C:/Program Files/CodeLite/h264_C++/os.cpp:104: error: 'hstrerror' was not declared in this scope
if (setsockopt(this->fd, SOL_SOCKET, SO_REUSEADDR,
&aReuseFlag, sizeof aReuseFlag) < 0) {
this->close();
return false;
}
C:/Program Files/CodeLite/h264_C++/os.cpp:143: error: cannot convert 'const int*' to 'const char*' for argument '4' to 'int setsockopt(SOCKET, int, int, const char*, int)'
[i] struct ip_mreqn aMulticastReq; [\i]
C:/Program Files/CodeLite/h264_C++/os.cpp:171: error: aggregate 'ip_mreqn aMulticastReq' has incomplete type and cannot be defined
[i] unsigned int aLength = ntohs(*(u_int16_t*)&aHeader[2]); [\i]
'u_int16_t' was not declared in this scope
it seems a library is missed but i think i declared all that i need. Any idea??