www.digitalmars.com         C & C++   DMDScript  

D - winsock.d

reply "Charles Sanders" <sanders-consulting comcast.net> writes:
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
Sep 21 2003
parent reply "Walter" <walter digitalmars.com> writes:
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
Sep 21 2003
parent reply "Charles Sanders" <sanders-consulting comcast.net> writes:
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
Sep 21 2003
parent reply "Charles Sanders" <sanders-consulting comcast.net> writes:
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
Sep 22 2003
next sibling parent "Vathix" <vathix dprogramming.com> writes:
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
Sep 22 2003
prev sibling parent Mike Wynn <mike l8night.co.uk> writes:
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)
Sep 23 2003