From: "Frans Bouwmans" <fbouwmans@spiditel.nl>
Subject: linking problem when using sockets with gnat 3.10p1 for NT
Date: 1998/07/22
Date: 1998-07-22T00:00:00+00:00 [thread overview]
Message-ID: <6p5k11$iof$1@cadmium.aware.nl> (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
next reply other threads:[~1998-07-22 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-22 0:00 Frans Bouwmans [this message]
1998-07-23 0:00 ` linking problem when using sockets with gnat 3.10p1 for NT Jerry van Dijk
1998-07-23 0:00 ` Tom Griest
1998-07-28 0:00 ` Frans Bouwmans
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox