This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gethostbyname & uname question, help!


On Fri, Dec 29, 2000 at 05:21:00PM +0800, crazyyao wrote:
> I am a green hand in cygwin programming.
> Would someone tell me how to get the network program compiled on cygwin?
> 
> I can't find which lib contains the function "uname" and
> the function "gethostbyname" can't return the right value, either.

I don't understand. Both functions are part of the standard
library and are linked in without giving any additional lib
when linking. gethostbynmae returns what Winsock returns
except the given name is a x.x.x.x address in which case
this address is returned.

> Which head file should I include, winsock.h or sys/socket.h?
> What's the differenc between them?

Don't include the winsock headers by yourself when creating a
Cygwin application.

> Which libs should I use?

libcygwin.a which is linked in by default. No commandline switch
necessary.

> Where are they?

/lib

> I used to work on Linux.

Congratulations.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]