LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Compiling a linux c project in win (https://www.linuxquestions.org/questions/programming-9/compiling-a-linux-c-project-in-win-80487/)

InDIo 08-09-2003 04:59 PM

Compiling a linux c project in win
 
I use gcc to compile a bunch of utilities I've made that do some HTTP stuff. I want to compile my source files in a winXp environment...

I'm using lcc version 3.1, I just don't have a clue of which is the gcc equivalent for windows. The program uses the following header files:
PHP Code:

    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <errno.h>
    #include <string.h>
    #include <netdb.h>
    #include <sys/types.h>
    #include <netinet/in.h>
    #include <sys/sockets.h> 

What compiler should I use, and what are the equivalents of these libraries in windows, if there is an equivalent!

Thank you!!:scratch:
:study:

jhorvath 08-09-2003 05:05 PM

you could build another toolchain on your linux box to compile native Win32 binaries or you can check out www.cygwin.com or http://www.mingw.org/

..i know nothing of windows programming ...sorry

InDIo 08-09-2003 05:09 PM

What do you mean by "toolchain"??

I'm not trying to build a win c source on linux. I am trying to compile a linux-gcc-compilable(!) .c source file under windows environment. I don't know * about cygwin, could you explain its functionallity?

kev82 08-09-2003 05:10 PM

what do you use from unistd cos your gonna be pretty buggered there if you try and compile in windows. all the netwk stuff is in winsock.h

there are many free compilers and many non-free ones, i myself used visual studio 6 so am not really familiar with the free ones but dev-c++ is supposed to be really good


All times are GMT -5. The time now is 12:54 PM.