users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling GNU Prolog using MSVC++


From: Daniel Diaz
Subject: Re: Compiling GNU Prolog using MSVC++
Date: Sat, 05 Apr 2003 11:13:51 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01

Cygwin is needed because the compilation process is based on Unix tools (autoconf, Makefiles, rm, cp, ...). I didn't spent time to write (and later maintain) 2 versions of compilation procedures :-). So you need cygwin to be able to execute Unix commands for the compilation. If you use MSVC then this compiler is invoked by the Makefiles. For this, under the cygwin shell, the MSVC compiler (cl) must be accessible (PATH must be set). Since cl needs some other environment variables (e.g. to find its includes, its libraries,...) MSVC provides a .bat (vcvars32.bat in 6.0) that should be run before invoking the bash (cygwin) shell. You can create a cyg_msvc.bat containing something like:

set HOME=c:\cygwin\home\foo
call c:\vcvars32.bat
c:\cygwin\cygwin.bat

I suppose cygwin is installed in c:\cygwin. You can define (not obligatory) your HOME variable (let's say your cygwin home is in c:\cygwin\home\foo). Doing this you can create in c:\cygwin\home\foo .bashrc and/or .bash_profile if you are a bash guru :-)

Run this cyg_msvc.bat to have access to a bash shell + MSVC.

Copy the gprolog-1.2.16.tar.gz (or other) under c:\cygwin\home\foo

Under cygwin bash
got to you home

   cd

uncompress the file:

   tar xfz gprolog-1.2.16.tar.gz

go to src subdir:

   cd gprolog-1.2.16/src

configure and make as described in the INSTALL file (do not forget to precise --with-msvc when running ./configure)

   ./configure --with-msvc

You can also precise other parameters like --with-install-dir=...

make the system

   make

To test the system locally compiled, execute:

   source SETVARS

Doing this you set the PATH to be able to executed gprolog locally compiled.

Test it:

   gprolog

   GNU Prolog 1.2.16
   By Daniel Diaz
   Copyright (C) 1999-2003 Daniel Diaz
   | ?- halt.


Good luck


address@hidden wrote:
Could someone walk me through the process of compiling GNU Prolog using Visual C++ step by step. I am a little confused by the installation instructions.

For example, the instructions say:
** Win32 preamble **
To compile GNU-Prolog under win32 (either with cygwin or MSVC++) you
must properly install cygwin development tools (see file src/CYGWIN).
TO use MSVC++ you should correctly define MSVC++ environment vars
        (normally MSVC++ creates a .bat file containing needed definitions,
        for instance c:\vcvars32.bat).

Why do I need CYGWIN development tools if I am going to compile under MSVC++?

I tried building in Visual C++ using the makefile, but I get this error:

--------------------Configuration: Makefile3 - Win32 Debug--------------------
(cd EnginePl; C:/GNU_Prolog_Src/gprolog-1.2.16/src/make.exe config)
process_begin: CreateProcess((null), (cd EnginePl; C:/GNU_Prolog_Src/gprolog-1.2.16/src/make.exe config), ...) failed.
make (e=2): The system cannot find the file specified.
C:\GNU_Prolog_Src\gprolog-1.2.16\src\make.exe: *** [all] Error 2
Error executing C:\GNU_Prolog_Src\gprolog-1.2.16\src\make.exe.

Makefile3.exe - 1 error(s), 0 warning(s)

Furthermore, what are those environment variables that need to be defined?


--
Ce message a subi une analyse antivirus par MailScanner ; il est vraisemblablement
sans danger.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]