Sinisterly
Missing Header files in GCC (Windows) - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: C, C++, & Obj-C (https://sinister.ly/Forum-C-C-Obj-C)
+--- Thread: Missing Header files in GCC (Windows) (/Thread-Missing-Header-files-in-GCC-Windows)



Missing Header files in GCC (Windows) - alok9shm - 06-21-2014

For some reasons I'm restricted to my Windows Machine for a few days and I'm using GCC [MINGW (Windows)] to compile my C source.

I've noticed some header files, that I use normally while programming in Ubuntu, becomes zombies in Windows.
Ex: sys/socket.h, netdb.h, netinet/in.h, arpa/inet.h etc.
Using winsock2.h works in place of sys/socket.h but I've not got the replacement for other header files.

Any suggestions, how to make them available in Windows?


RE: Missing Header files in GCC (Windows) - ArkPhaze - 06-22-2014

You think it should be normal for Windows to include headers for code that it can't use anyways because they include Unix functions? lol... Manually create the data structures that you need and utilize them individually. structs and other classes should work, as long as you replace all function calls that they might contain with Windows equivalents.


RE: Missing Header files in GCC (Windows) - alok9shm - 06-23-2014

(06-22-2014, 09:35 PM)ArkPhaze Wrote: Manually create the data structures that you need and utilize them individually. structs and other classes should work, as long as you replace all function calls that they might contain with Windows equivalents.

I'm trying to use getaddrinfo() to resolve the IP address of a URL.
Is this the thing: http://msdn.microsoft.com/en-us/library/windows/desktop/ms737530(v=vs.85).aspx


RE: Missing Header files in GCC (Windows) - ArkPhaze - 06-24-2014

Yeah, but why do you need such Linux headers then? That is a Windows function... Do you know how to link to Ws2_32? Do you know what headers you *really* need?