LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Cross-COmpiling with MinGW32 headers (https://www.linuxquestions.org/questions/linux-software-2/cross-compiling-with-mingw32-headers-332562/)

Adam15906 06-11-2005 05:20 PM

Cross-COmpiling with MinGW32 headers
 
I was just wondering excatly where I get stuff for the MinGW cross compiler.

I have it installed and everything works nicely but I can't find some header files to do some header files.

I wonder if I can find sys/socket.h, netdb.h, netinit/in.h, and arpa/inet.h for MinGW. I am trying to cross-compile wget. I have those files in /usr/local but I can't get ./configure to find them after I do ./configure --host=i586-mingw32msvc.

Tusk 09-16-2005 05:51 PM

You need to port your code to win32

The following is an example.

#ifdef WIN32
# include <Winsock2.h>
#else
# include <sys/socket.h>
# include <sys/param.h>
# include <netinet/in.h>
# include <arpa/inet.h>
# indlude <netdb.h>
#endif


Includeing Winsock2.h is basically equivalent to including:
sys/socket.h, sys/param.h, netinet/in.h, arpa/inet.h, & netdb.h

It should be included once for any file needing one or more of those headers.

Hope this helps,
Tusk

Snowbat 09-16-2005 09:51 PM

Other people have already published win32 builds of wget. Are you doing this for educational reasons?


All times are GMT -5. The time now is 09:26 AM.