LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-09-2003, 04:59 PM   #1
InDIo
LQ Newbie
 
Registered: Jul 2003
Location: Greece
Distribution: Red Hat
Posts: 18

Rep: Reputation: 0
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!!
 
Old 08-09-2003, 05:05 PM   #2
jhorvath
Member
 
Registered: Sep 2002
Location: OH, USA
Distribution: 2.6.16-1.2096_FC5 #1
Posts: 245

Rep: Reputation: 30
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
 
Old 08-09-2003, 05:09 PM   #3
InDIo
LQ Newbie
 
Registered: Jul 2003
Location: Greece
Distribution: Red Hat
Posts: 18

Original Poster
Rep: Reputation: 0
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?
 
Old 08-09-2003, 05:10 PM   #4
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling qt4 apps for non-qt4 linux, win, mac birdseye Programming 4 10-31-2005 04:45 AM
Compiling RedHat Project Under SuSE drumstick SUSE / openSUSE 5 03-20-2005 12:20 PM
Compiling RedHat Project Under SuSE drumstick Programming 2 03-20-2005 08:53 AM
Error in compiling QT Project thelogins Red Hat 0 04-21-2004 03:06 AM
cross-compiling for win under linux rebelcan Linux - Newbie 2 06-17-2003 05:51 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration