Newbie with socket problems...(pretty long)

Mumit Khan khan@xraylith.wisc.EDU
Tue Aug 31 23:49:00 GMT 1999


Simon Gornall <simon@unique-id.com> writes:
> I've just downloaded a clean 'full install' of the B20.1 cygnus
> development
> environment, and I seem to be having problems with sockets. It's all
> linking
> correctly, and I can't seem to find anyone else with problems recently,
> so
> I assume I'm linking it incorrectly or something... If anyone cares to
> have a
> look and see what I'm doing wrong, I'd be very grateful. I'm *almost* at

I notice that you're using -mno-cygwin. You certainly want to read my
notes on using -no-cygwin available at:

  http://www.xraylith.wisc.edu/~khan/software/gnu-win32/

Also, while you're at the above URL, you may seriously consider upgrading
your compilers to gcc-2.95.

before doing things like:

> One thing I did have to do was move the libstdc++.a from the mwing32
> libraries directory to the 'standard'
> directory, or I got loads of 'undefined XXX' errors, where XXX where
> obviously global variables.

Remember that you're using Winsock, not Berkeley or POSIX sockets that's
common on Unix systems. For Winsock, you *have* to call WSAStartup
first (see windows docs on microsoft site or in your favorite w32 api
book). Unless you have other problems in the code, this should fix
it.

When you post asking for help, you really ought to try and explain 
better as to what problem you're having. For example, is it not 
connecting? Is it not opening the stream socket? This really saves
time when looking at others' code.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list