Thread overview
winsock.d
Sep 21, 2003
Charles Sanders
Sep 21, 2003
Walter
Sep 21, 2003
Charles Sanders
Sep 23, 2003
Charles Sanders
Sep 23, 2003
Vathix
Sep 23, 2003
Mike Wynn
September 21, 2003
Hey all,

Im using Pavel's winsock.d in my project, and it all works good but when linking I against ws2_32.lib I get :

OPTLINK (R) for Win32  Release 7.50B1

 Error 42: Symbol Undefined __WSAFDISSET
--- errorlevel 1

I create a listing of the library with lib -l ws2_32.lib and I see that its there listed as

___WSAFDIsSet@8

I try to create a defintion file for the library it looks like :

LIBRARY ws2_32
 EXETYPE NT
 SUBSYSTEM WINDOWS
 EXPORTS
     ___WSAFDIsSet@8 = __WSAFDIsSet

as taken from the example at http://www.digitalmars.com/faq.html#sysimport

i then run

implib ws2_32.lib ws2_32.def

create another listing and it only shows that one function :

Publics by name  module
___WSAFDIsSet@8                  ___WSAFDIsSet@8


Publics by module
___WSAFDIsSet@8
 ___WSAFDIsSet@8

Is my defintion file messed up ?  Sorry Ive never used these before.

Thanks,
C


September 21, 2003
Declare WSAFDISSET as being extern (Windows).

"Charles Sanders" <sanders-consulting@comcast.net> wrote in message news:bkjcj9$1l8p$1@digitaldaemon.com...
> Hey all,
>
> Im using Pavel's winsock.d in my project, and it all works good but when linking I against ws2_32.lib I get :
>
> OPTLINK (R) for Win32  Release 7.50B1
>
>  Error 42: Symbol Undefined __WSAFDISSET
> --- errorlevel 1
>
> I create a listing of the library with lib -l ws2_32.lib and I see that
its
> there listed as
>
> ___WSAFDIsSet@8
>
> I try to create a defintion file for the library it looks like :
>
> LIBRARY ws2_32
>  EXETYPE NT
>  SUBSYSTEM WINDOWS
>  EXPORTS
>      ___WSAFDIsSet@8 = __WSAFDIsSet
>
> as taken from the example at http://www.digitalmars.com/faq.html#sysimport
>
> i then run
>
> implib ws2_32.lib ws2_32.def
>
> create another listing and it only shows that one function :
>
> Publics by name  module
> ___WSAFDIsSet@8                  ___WSAFDIsSet@8
>
>
> Publics by module
> ___WSAFDIsSet@8
>  ___WSAFDIsSet@8
>
> Is my defintion file messed up ?  Sorry Ive never used these before.
>
> Thanks,
> C
>
>


September 21, 2003
Ok that works thanks :).  Why would one use extern (Pascal) as opposed to
(Windows) ?  Also how can I get implib to add those defintions along with
the existing ones in a library ?

Thanks,
Charles
"Walter" <walter@digitalmars.com> wrote in message
news:bkks91$100f$2@digitaldaemon.com...
> Declare WSAFDISSET as being extern (Windows).
>
> "Charles Sanders" <sanders-consulting@comcast.net> wrote in message news:bkjcj9$1l8p$1@digitaldaemon.com...
> > Hey all,
> >
> > Im using Pavel's winsock.d in my project, and it all works good but when linking I against ws2_32.lib I get :
> >
> > OPTLINK (R) for Win32  Release 7.50B1
> >
> >  Error 42: Symbol Undefined __WSAFDISSET
> > --- errorlevel 1
> >
> > I create a listing of the library with lib -l ws2_32.lib and I see that
> its
> > there listed as
> >
> > ___WSAFDIsSet@8
> >
> > I try to create a defintion file for the library it looks like :
> >
> > LIBRARY ws2_32
> >  EXETYPE NT
> >  SUBSYSTEM WINDOWS
> >  EXPORTS
> >      ___WSAFDIsSet@8 = __WSAFDIsSet
> >
> > as taken from the example at
http://www.digitalmars.com/faq.html#sysimport
> >
> > i then run
> >
> > implib ws2_32.lib ws2_32.def
> >
> > create another listing and it only shows that one function :
> >
> > Publics by name  module
> > ___WSAFDIsSet@8                  ___WSAFDIsSet@8
> >
> >
> > Publics by module
> > ___WSAFDIsSet@8
> >  ___WSAFDIsSet@8
> >
> > Is my defintion file messed up ?  Sorry Ive never used these before.
> >
> > Thanks,
> > C
> >
> >
>
>


September 23, 2003
Ok I see now.  What is the difference between

__pascal

and

__cdecl

?

I know __cdecl parses arguemnts right to left and uses stack to pass arguments, how does that differ from pascal ?

C
"Charles Sanders" <sanders-consulting@comcast.net> wrote in message
news:bkl2jg$18iq$1@digitaldaemon.com...
> Ok that works thanks :).  Why would one use extern (Pascal) as opposed to
> (Windows) ?  Also how can I get implib to add those defintions along with
> the existing ones in a library ?
>
> Thanks,
> Charles
> "Walter" <walter@digitalmars.com> wrote in message
> news:bkks91$100f$2@digitaldaemon.com...
> > Declare WSAFDISSET as being extern (Windows).
> >
> > "Charles Sanders" <sanders-consulting@comcast.net> wrote in message news:bkjcj9$1l8p$1@digitaldaemon.com...
> > > Hey all,
> > >
> > > Im using Pavel's winsock.d in my project, and it all works good but
when
> > > linking I against ws2_32.lib I get :
> > >
> > > OPTLINK (R) for Win32  Release 7.50B1
> > >
> > >  Error 42: Symbol Undefined __WSAFDISSET
> > > --- errorlevel 1
> > >
> > > I create a listing of the library with lib -l ws2_32.lib and I see
that
> > its
> > > there listed as
> > >
> > > ___WSAFDIsSet@8
> > >
> > > I try to create a defintion file for the library it looks like :
> > >
> > > LIBRARY ws2_32
> > >  EXETYPE NT
> > >  SUBSYSTEM WINDOWS
> > >  EXPORTS
> > >      ___WSAFDIsSet@8 = __WSAFDIsSet
> > >
> > > as taken from the example at
> http://www.digitalmars.com/faq.html#sysimport
> > >
> > > i then run
> > >
> > > implib ws2_32.lib ws2_32.def
> > >
> > > create another listing and it only shows that one function :
> > >
> > > Publics by name  module
> > > ___WSAFDIsSet@8                  ___WSAFDIsSet@8
> > >
> > >
> > > Publics by module
> > > ___WSAFDIsSet@8
> > >  ___WSAFDIsSet@8
> > >
> > > Is my defintion file messed up ?  Sorry Ive never used these before.
> > >
> > > Thanks,
> > > C
> > >
> > >
> >
> >
>
>


September 23, 2003
I think pascal is the same as stdcall except reversed order parameters.

"Charles Sanders" <sanders-consulting@comcast.net> wrote in message news:bko932$157f$1@digitaldaemon.com...
> Ok I see now.  What is the difference between
>
> __pascal
>
> and
>
> __cdecl
>
> ?
>
> I know __cdecl parses arguemnts right to left and uses stack to pass arguments, how does that differ from pascal ?
>
> C



September 23, 2003
Charles Sanders wrote:
> Ok I see now.  What is the difference between
> 
> __pascal
> 
> and
> 
> __cdecl
> 
> ?
> 
> I know __cdecl parses arguemnts right to left and uses stack to pass
> arguments, how does that differ from pascal ?
> 

pascal pushes the arguments left to right, and the callee cleans the stack (not caller as with cdecl)