From jan@swi.psy.uva.nl  Tue Nov 21 12:07:46 2000
Received: from gollem.swi.psy.uva.nl (gollem [145.18.152.30])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id MAA06313;
	Tue, 21 Nov 2000 12:07:46 +0100 (MET)
Received: (from jan@localhost)
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id MAA26353;
	Tue, 21 Nov 2000 12:07:00 +0100
Date: Tue, 21 Nov 2000 12:07:00 +0100
Message-Id: <200011211107.MAA26353@gollem.swi.psy.uva.nl>
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Subject: Re: clib package under Windows
To: Bernd Thomas <bthomas@uni-koblenz.de>
In-Reply-To: Bernd Thomas's message of Tue, 21 Nov 2000 11:28:49 +0100
Phone: +31 - 20 - 525 6121
Cc: prolog@gollem.swi.psy.uva.nl

[ replied to mailing list; there are people around knowing a lot more
  about windows then I do

  If someone could start a page on the user-web, a number of users
  would be more happy.
]

> unfortunatley I have to use Windows as platform. I already wrote some
> modules (http client/server) using your clib package under linux. Can
> you give me any hints how to port the clib package to windows. More
> precise:
> 
> - what C compiler do I need, will gcc for windows work?

SWI-Prolog is compiled using MSVC 5.0.  Any compiler that can produce
DLLs with the same calling conventions (the foreign interface functions
are simply exported which implies, as far as I know, the C-calling
conventions are used) and read the MSVC 5.0 import libraries will
do.  I would assume most compilers try to ensure compatibility to
MSVC in this respect.

Though I'm not sure, I assume compiling SWI-Prolog plcon.exe using
gcc/cygwin should be fairly trivial, given that both are Unix/POSIX
based.

> - as far as I know the unix process management, means fork predicates
> and everything dealing with PIDs will not work under windows. Is there a
> chance to create threads/forks from within SWI under windows?

I've heart rumours cygwin provides fork().  Multi-threading is supported
only using the pthread library.  Don't know whether there is a windows
version.

> - do you have any .dll available, that really would minimize my effort.

Only the socket interface compiles without problems on msvc.  The
CGI interface should be trivial too.  The rest is very Unix/POSIX
specific and if cygwin provides not enough you really need to start
reconsidering your design at higher level.

	--- Jan

