comp.lang.ada
 help / color / mirror / Atom feed
* linking problem when using sockets with gnat 3.10p1 for NT
@ 1998-07-22  0:00 Frans Bouwmans
  1998-07-23  0:00 ` Jerry van Dijk
  1998-07-23  0:00 ` Tom Griest
  0 siblings, 2 replies; 4+ messages in thread
From: Frans Bouwmans @ 1998-07-22  0:00 UTC (permalink / raw)


I'm trying to use sockets in ada with gnat 3.10
I used glade as an example for calling to windows socket calls
however I get problems with linking
This is a part of the code showing the problem

--
with interfaces.c;
pragma Linker_Options ("-lwsock32");


procedure test_sock is
   package c renames interfaces.c;

   package net is
      function C_Listen (S, Backlog : C.int) return C.int;

   private
      pragma Import (C, C_Listen, "listen");
   end net;

  s,backlog,result : C.int;
begin
  result := net.C_Listen(s,backlog);
end test_sock;


-- this program compiles correctly but does not link it gives the following
error:

gnatlink test_sock.ali -lwsock32

./test_sock.o: In function `ada_test_sock':
//C/USR/ada/l11/test_sock.adb:17: undefined reference to `listen'

the linker can find the libwsock32.a because when i change the name it
cannot find it

Frans






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-07-28  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-22  0:00 linking problem when using sockets with gnat 3.10p1 for NT Frans Bouwmans
1998-07-23  0:00 ` Jerry van Dijk
1998-07-23  0:00 ` Tom Griest
1998-07-28  0:00   ` Frans Bouwmans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox