开发者

Downloading Header Files

开发者 https://www.devze.com 2023-01-29 17:13 出处:网络
Where can i download the following header files for dev c sys/types.h sys/socke开发者_如何转开发t.h

Where can i download the following header files for dev c

sys/types.h sys/socke开发者_如何转开发t.h netinet/in.h arpa/inet.h

and also the structure

sockadder and it's derivatives?


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

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

That said, from some indeterminate 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 missing files, consider getting/reinstalling a proper compiler suite and any developer packages your are missing.

If you want to look at the structure definitions you should definitely be looking at the documentation rather than the actual implementations. That way you avoid tying your code to private definitions e.t.c. that can change between systems.

EDIT:

Just to confirm some of my comments above, struct sockaddr for said version of Linux is defined piece-by-piece in:

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

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


What SDK are you working with? For Linux you get these files as part of your core C sdk. For Windows it comes with the SDK as well. If you just want a quick and dirty look at some header files I use http://www.google.com/codesearch.


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

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

If your implementation provides them as real files and you deleted them, reinstalling the compiler might work.

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


I'm assuming that you are trying to compile a source code for the *nix platform under another, such as Windows. This approach won't do you any good. Remember that you'll need the libraries of those headers and they are not portable.

Install a Virtual Machine with Ubuntu on your PC to do this kind of development.


do:
apt-get install gcc-4.2
0

精彩评论

暂无评论...
验证码 换一张
取 消