I downloaded the compiler here:
http://sourceware.cygnus.com/cygwin/
http://www.cyberport.com/~tangent/programming/winsock/
EX: compile with
g++ -c "prg.name".cpp
g++ "prg.name".o -lwsock32 -o "prg.name"
your program should include winsock.h
noddoplay <c97...@student.dtu.dk> skrev i en
nyhedsmeddelelse:8f8c9a$asj$1...@nevald.k-net.dk...
>Is it possible to program winsock in GNU's c++ compiler?
>
>I downloaded the compiler here:
>http://sourceware.cygnus.com/cygwin/
>
>
Im sure you can, but if you are using cygwin, you know you can use
Berkeley sockets, you have it already..just include the .h files, and
you are on...
with the cygwin C++ compiler,,just pretend you are in unix (well
almost)....
But if you absolutely need to use WinSock...well...cant help ya..
---rob
---------------------------------------------------
"Give a man a fish, and he eats for a day.
Teach a man to fish, and he eats for a lifetime." - saw it on TV.
---------------------------------------------------
---Rob
rsuh_news@robsuh_nospam_.com
kill the _nospam_ part
Rob <rsuh_news@robsuh_nospam_.com> skrev i en
nyhedsmeddelelse:391a00d3....@news.mminternet.com...
>I'm using cygwin, but I'm new in this winsock-thing :).
>* What is Berkeley sockets?
Berkeley sockets are the original implementation of sockets. Think of
them as a phone. A programme (server) may listen for a connection.
Another programme (client) may connect to the sockets. If the server
accepts the connection a new socket is created on which both the
server and the client may send and receive data.
>* what's the difference between WinSock and Berkeley sockets?
Winsock 1.1 and Berkeley sockets are almost the same thing. Winsock 2
is heavily connected with the way Windows handles messages. For large
servers (say more than 1000 connections) this is the way to go. If you
need any kind of portability of your code between Windows and Unix
then stick to Winsock 1.1 and buy a network programming book for Unix.
Note however that there is no problem in making a connection between
Winsock 1.1 and Winsock or Windows and Unix.
Have fun
Lars
------------------------------
Lars Gregersen (l...@kt.dtu.dk)
http://www.gbar.dtu.dk/~matlg
http://members.xoom.com/gregersenweb/
The FAQ covers some of the differences, from the perspective of "how do
I do this BSDish thing under Winsock?"
For the most part, though, it's possible to write code that ports well
between the two platforms. Contrariwise, of course, it's possible to
write sockets code that's a real pain to port between Unix and Windows.
:)
--
= Warren Young, maintainer of the Winsock Programmer's FAQ at:
= http://www.cyberport.com/~tangent/programming/winsock/
=
= ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m