Thanks for your response.
I used this parameter to compile the program. But I got the following=20
different message:
g++: -lwsock32: linker input file unused since linking not done
I think this is the right way to follow, but I am still missing something.=
=20
Any ideas?
Tks again,
Flavio.
At 09:01 18/11/01 +1100, you wrote:
>Hi,
>
>I'm not experienced with winsock programming ... but ... did you link
>the winsock library??
>
>Somewhere where you set linker options you will need to add -lwsock32
>
>Ray Smith
>
>
>----- Original Message -----
>From: Fl=E1vio de Souza <fla...@se...>
>To: <dev...@li...>
>Sent: Sunday, November 18, 2001 5:36 AM
>Subject: [Dev-C++] Linking error (help please!)
>
>
> > Hi !
> >
> > I am trying to compile and linking this simple code:
> >
> > #include <winsock.h> // winsock.h always needs to be included
> > #include <stdio.h>
> > #include <windows.h>
> >
> > file://Prototypen
> > int startWinsock(void);
> >
> > int main(int argc, char *argv[])
> > {
> > long rc;
> > rc=3DstartWinsock();
> > if(rc!=3D0)
> > {
> > printf("Error: startWinsock, error code: %d\n",rc);
> > return 1;
> > }
> > else
> > {
> > printf("Winsock started!\n");
> > }
> > return 0;
> > }
> >
> > int startWinsock(void)
> > {
> > WSADATA wsa;
> > return WSAStartup(MAKEWORD(1,1),&wsa);
> > }
> >
> >
> > But I got this error:
> >
> > c:\meus documentos\projetos\sistema de
> >
>e-mails\source\socketconnection\socket_test\socket_t2.o(.text+0xad):socket_=
t
>2.cpp:
> > undefined reference to `WSAStartup@8'
> >
> > I don't know what causes this, do you have any ideas?
> >
> > Probably it is a silly error.
> >
> > Tks,
> >
> > Flavio.
> > Flavio de Souza
> > fla...@ne...
> > ICQ:78458203
> >
>
>
>---------------------------------------------------------------------------=
-
>----
>
>
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01
> >
>
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.295 / Virus Database: 159 - Release Date: 01/11/01
|