Difference between revisions of "CoCoALib:HowTo:Compile CoCoALib on Windows"

From ApCoCoAWiki
(Initial CoCoALib Compilation On Windows instructions)
 
m
Line 1: Line 1:
 
=Introduction=
 
=Introduction=
This site is set up to collect all necessary bits and pieces to compile the CoCoALib on Windows.
+
*This site is set up to collect all necessary bits and pieces to compile the CoCoALib on Windows.
Note that the current implementation does not enable all functions available in the CoCoALib.
+
*Note that the current implementation does not enable all functions available in the CoCoALib.
This description is made for compiling the CoCoALib with MSVC 2003/2005.
+
*This description is made for compiling the CoCoALib with MSVC 2003/2005.
  
 
=Preparation=
 
=Preparation=
 
Before compiling the CoCoALib you need to install the following files:
 
Before compiling the CoCoALib you need to install the following files:
  
*GMP Library (ToDo: Add links): You will need this library to enable a few features in the CoCoALib. You can either download the full GMP libraries or get a selection of files needed for the CoCoALib.
+
*GMP Library: You will need this library to enable a few features in the CoCoALib. You can either download the full GMP libraries or get a selection of files needed for the CoCoALib.
** A howto for installing the GMP lib on Windows and compile it on your own can be found [http:// here].
+
** A howto for installing the GMP lib on Windows and compile it on your own can be found ''[http:// here]''.
** A selection of needed files can be found [http:// here]. Download the archive and extract it to your local harddisk. We will refer to these files with the keyword %GMPpath
+
** A selection of needed files can be found ''[http:// here]''. Download the archive and extract it to your local harddisk. We will refer to these files with the keyword %GMPpath
 
   
 
   
 
*HG mercurial: You will need this software only if you want to use the latest CoCoALib. The source control system HG is used to apply a few changes to the CoCoALib via a patch. We will refer to TortoiseHG. TortoiseHG will install mercurial on your system and adds a context menu in the MS Explorer providing many of the needed functionalities.  
 
*HG mercurial: You will need this software only if you want to use the latest CoCoALib. The source control system HG is used to apply a few changes to the CoCoALib via a patch. We will refer to TortoiseHG. TortoiseHG will install mercurial on your system and adds a context menu in the MS Explorer providing many of the needed functionalities.  

Revision as of 10:22, 25 February 2008

Introduction

  • This site is set up to collect all necessary bits and pieces to compile the CoCoALib on Windows.
  • Note that the current implementation does not enable all functions available in the CoCoALib.
  • This description is made for compiling the CoCoALib with MSVC 2003/2005.

Preparation

Before compiling the CoCoALib you need to install the following files:

  • GMP Library: You will need this library to enable a few features in the CoCoALib. You can either download the full GMP libraries or get a selection of files needed for the CoCoALib.
    • A howto for installing the GMP lib on Windows and compile it on your own can be found [http:// here].
    • A selection of needed files can be found [http:// here]. Download the archive and extract it to your local harddisk. We will refer to these files with the keyword %GMPpath
  • HG mercurial: You will need this software only if you want to use the latest CoCoALib. The source control system HG is used to apply a few changes to the CoCoALib via a patch. We will refer to TortoiseHG. TortoiseHG will install mercurial on your system and adds a context menu in the MS Explorer providing many of the needed functionalities.
    • Download TortoiseHG here.
    • A more detailed documentation on you how to use mercurial can be found here.

Download Instructions

There are two possible downloads available:

  • Download the latest CoCoALib from the official website and apply a patch
  • Download a modified CoCoALib. This version has been tested to compile on Windows but might not be the latest CoCoALib version

CoCoALib MSVC Version

Get the latest MSVC ready version from our download page: ToDo: add link

CoCoALib with patch

To enable a compilation with nmake in MSVC the makefiles have to be added to the lib. To keep things easy we provide a patch.

  • Download the latest CoCoALib source files from the CoCoA website: Download Page.
  • Download the patch here: ToDo: add link
  • Creating a Repo: In order to apply the patch the current CoCoALib directory has to be turned into a HG repo. To do so select the CoCoALib folder in your Browser and choose from the HG context menu: Create Repository here.
  • Applying patch: This has to be done from the command line. Type in your command line window:

<c>hg import -m "Apply MSVC patch" CoCoALib_MSVC.patch</c>

Compilation Instructions

Config file

Prior to compilation you have to adjust the configuration file. Open the file makefile.vc.conf in the configuration subfolder. Set the %GMPpath by adapting the following two lines: <c> _GMP_INCLUDE=..\..\..\gmp_p4_dll _GMP_LIB=..\..\..\gmp_p4_dll\gmp.lib </c> _GMP_INCLUDE contains the path to your GMP binaries. _GMP_LIB points to the gmp.lib file.

gmp.h

For the current CoCoALib Version the header file gmp.h (found in %GMPpath) has to be copyed manually to the following subfolders:

  • src\AlgebraicCore\TmpFactorDir
  • src\AlgebraicCore\TmpHilbertDir

Compilation

Open a Visual Studio command prompt and change to your local CoCoALib folder. Use the nmake command to compile the CoCoALib:

  • Displays a list of available targets

<c>nmake -f Makefile.vc

This makefile builds the CoCoALib. This build system is specific for the Microsoft environment using MSVC 2003/5. For more information check out http://cocoa.mathematik.uni-dortmund.de/forum Available targets are: nmake -f makefile.vc "target" clean : remove all files created CoCoALib: build CoCoALib ;) tests : build tests examples: build examples Not merged is the possibility of building a non-threaded version of the CoCoAServer. </c>

  • Builds the CoCoALib

<c>nmake -f Makefile.vc CoCoALib</c>

Problems

If you encounter problems check out the forum: CoCoA Forum