2005-03-02 08:23:08 UTC
hi there,
i'm compiling the following code:
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h> /* definition of struct sockaddr_in */
#include <netdb.h> /* definition of gethostbyname */
#include <arpa/inet.h> /* definition of inet_ntoa */
#include <unistd.h> /* definition of close */
#define TIMESTAMP 100
class Stub
{
public:
Stub();
~Stub();
int acceptClient(int server_fd);
int createServer(int port);
void reset();
void run(int ms);
private:
int fd;
fd_set rfds;
};
#endif //_STUB_H_
and i get the following errors:
Compiler: Default compiler
Building Makefile: 'C:HomeMyProjectswebotscontrollersOmniMakefile.win'
Executing make..
make.exe -f 'C:HomeMyProjectswebotscontrollersOmniMakefile.win' all
g++.exe -c main.cpp -o main.o -I'lib/gcc/mingw32/3.4.2/include'
-I'include/c++/3.4.2/backward' -I'include/c++/3.4.2/mingw32'
-I'include/c++/3.4.2' -I'include' -I'C:/Program Files/Webots/include'
-I'C:/Program Files/Webots/include/device' -I'C:/Program
Files/Webots/include/ode' -I'C:/Program Files/Webots/include/physics'
-I'C:/Home/Programs/Dev-Cpp/include' -ansi -fexceptions -fshort-double
-fexpensive-optimizations -march=i686
In file included from main.cpp:6:
stub.h:5:24: sys/socket.h: No such file or directory
stub.h:7:63: netinet/in.h: No such file or directory
stub.h:8:58: netdb.h: No such file or directory
stub.h:9:54: arpa/inet.h: No such file or directory
In file included from main.cpp:6:
stub.h:27: error: `fd_set' does not name a type
make.exe: *** [main.o] Error 1
Execution terminated
I'm Using WinXP SP2 and the Dev-c++ 4.9.9.2
anyclues?
thank you
  1. This part describes each header file, explains its contents, and lists the functions that use the file. The function descriptions are described in Library functions. The header files provided with the z/OS® XL C/C Library contain macro and constant definitions, type definitions, and function declarations.
  2. @Richard MacCutchan Even when i tried to add winsock2.h to my library. Only netinet in.h=' make all LNK 2019 errors dismissed. 1 thing is this program I've fixing is working parallel with second program call 'C controller' and this program will took the signal value of my fixing program to control robot and in the include it has #includeh=' so i think the.
C%2b%2b

Netinet In H Dev C 2b 2b 1b

P: n/a
an******@gmail.com wrote:

I need to port some C code from UNIX SGI to Windows (MS VC++ compiler).
The following header files arent available in windows:
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <netdb.h>
#include <arpa/inet.h>
Does anyone have any suggestions on how to get windows versions of
these? Thanks!

Those headers are not available in standard C, as discussed here.
Your code is not portable. What you need is the appropriate
libraries and their header files, not just the headers. For that
go to a group covering your peculiar system. It may well have
Microsoft in its name.
You will probably be better off avoiding windoze entirely and
switching to a linux system. Certainly cheaper and more reliable.
--
'If you want to post a followup via groups.google.com, don't use
the broken 'Reply' link at the bottom of the article. Click on
'show options' at the top of the article, then click on the
'Reply' at the bottom of the article headers.' - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>

Netinet In H Dev C 2b 2b 1

/sonic-3-26-knuckles-download.html. This is the same number which appears on protocol field in the IP header of a packet.(man protocols for more details) Setsockopt: int setsockopt(int sockfd, int level, int optname, const void.optval, socklent optlen); This helps in manipulating options for the socket referred by the file descriptor sockfd.