Download header files

Where can I download the following header files for dev c

Sys / types.h sys / socket.h netinet / in.h arpa /inet.h

as well as the structure

sockadder and its derivatives?

+4
source share
5 answers

I don’t know why you need to download these specific files, since they should come with your compiler kit on most modern systems.

You should also keep in mind that they can be radically different depending on your platform and that these files often #include other non-standard files (which #include others, etc.). This can make these files very difficult to parse and understand.

However, from some undefined version of Linux:

http://linux.die.net/include/sys/types.h

http://linux.die.net/include/sys/socket.h

http://linux.die.net/include/netinet/in.h

http://linux.die.net/include/arpa/inet.h

If you are going to replace the missing files, consider getting / reinstalling the correct set of compilers and any developer packages that you do not have.

If you want to take a look at the definitions of the structure, you should definitely look at the documentation, not the actual implementations. This way you avoid associating your code with private definitions etc which may vary between systems.

EDIT:

To confirm some of my comments above, struct sockaddr for a given version of Linux is defined in parts at:

http://linux.die.net/include/bits/socket.h

http://linux.die.net/include/bits/sockaddr.h

+5
source

What SDK are you working with? For Linux, you get these files as part of your main Cdk. For Windows, it also comes with an SDK. If you just need a quick and dirty look at some header files, I use http://www.google.com/codesearch .

+1
source

Those headers (not header files) are part of the implementation. They should not be real files.

If your implementation does not provide them, you are out of luck.

If your implementation provides them with real files and you delete them, reinstalling the compiler may work.

If your implementation provides them as real files, and you cannot reinstall the compiler, your approach may work. Sorry, I have no idea where to download the files --- or why anyone should copy the files somewhere in the first place.

0
source
 do: apt-get install gcc-4.2 
0
source

I assume that you are trying to compile the source code for the * nix platform under a different one, such as Windows. This approach will not do you any good. Remember that you will need libraries of these headers and they are not portable.

Install a virtual machine using Ubuntu on your PC to make this kind of development.

0
source

All Articles