Login Register


Missing Header files in GCC (Windows) filter_list
Author
Message
Missing Header files in GCC (Windows) #1
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?
[Image: MUJ8qSW.png]
-----------------------------------
Now learning:
Android Development, Java
Working on:
An FTP Client for Android
-----------------------------------

Reply

RE: Missing Header files in GCC (Windows) #2
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.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: Missing Header files in GCC (Windows) #3
(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/...s.85).aspx
[Image: MUJ8qSW.png]
-----------------------------------
Now learning:
Android Development, Java
Working on:
An FTP Client for Android
-----------------------------------

Reply

RE: Missing Header files in GCC (Windows) #4
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?
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply







Users browsing this thread: 1 Guest(s)