2005/5/10

     
 

How to compile ACDK

artefaktur

This is a generic installation for ACDK packages.


Content of this chapter:

   General notes
   Supported Plattforms
   Unpacking
     Unix
     Windows
   Setting up the environment
     ACDK enviromnent variables
     External Libraries
   Compiling using make files
     Unix
     Linux
       Notes for Linux
     Solaris
     Windows Visual Studio
       Visual Studio 6
       Visual Studio .NET / 7
       Visual Studio 2005 Express Beta
       Lancher scripts for the Visual Studio IDEs
     Borland C++-Builder X
     Borland BCC 5.5x
   Missing Header/Libraries
   Compiling using acdkmake
     Usual targets
   Required Libraries
   More information



 General notes

ACDK is split in several packages. Each package can be installed/compiled separately.
Most packages  depends on other ACDK packages. For instance the package acdk_lisp depends on acdk_core and acdk_text. These packages must be installed before you try to install and compile the acdk_lisp package. Please refer to the package documentation regarding the detailed requirements.


This installation note describes the installation of one ACDK package named "acdk_package".

 Supported Plattforms

Windows NT 4/2000/XPMS Visual C++ 6 (released)
Windows NT 4/2000/XPMS Visual C++ 7/2003 (AKA .NET), MS Visual Studio 2005 Express Beta
Windows NT 4/2000/XPBorland BCC 5.5 (experimental)
Windows NT 4/2000/XPBoland C++-Builder 6 (experimental)
Windows NT 4/2000/XPBoland C++-Builder X (experimental)
Windows NT 4/2000/XPgcc 2.92 (static linked)(experimental)
Linuxgcc 2.95.2 - 4.x (released)
LinuxBorland C++-BuilderX and gcc
Linux on 64bit Opterongcc 3.x (released)
Sun Solaris 9/10 Intelgcc 2.95.2 - 3.x(released)
Sun Solaris 9 Sparcgcc 2.95.2 - 3.x(released)
Sun SolarisSun Workshop 5.2/3 (experimental)
FreeBSD 4.0 - 5.xgcc 2.95.2 - 3.4(released)

 Unpacking

The ACDK packages are provided 2 formats: Unix .tar.gz and Windows .zip format. The packages contains the same files, but in the windows .zip packages the sources are encoded in the windows file format ("\r\n").

 Unix

You can unpack ACDK in home directory or in any other location.

cd /usr/local # the parent directory of ACDK
tar zxf acdk-*.tar.gz # and untar the package

This extract the files into a directory:
/usr/local/acdk/
where:
/usr/local/acdk
is the ACDKHOME.



 Windows

On Windows platform unzip the ACDK package in one directory:
for example c:\artefaktur

d:\artefaktur
This will create the directory:

d:\artefaktur\acdk


 Setting up the environment

 ACDK enviromnent variables


Whenever you want to configure, compile, install or run ACDK, following environment variable are needed:
  • ACDKHOME: The home of ACDK, target of installed header, and other files.

  • PATH: Path to search executable. You may extend this with the ACDK binary path:
    export PATH=%PATH%:$ACDKHOME/bin # bash or ksh
  • LD_LIBRARY_PATH: Path to search shared libraries. You have to extend this to the ACDK library path:
    export PATH=%PATH%:$ACDKHOME/bin

 External Libraries

Some optional packages (like acdk_net, acdk_wx, acdk_perl, acdk_python, acdk_tcl, acdk_sql_odbc) external libraries need to be installed. The name, locatation and other settings can be (and probably must) be corrected in following configuration files.
  • acdkenv.cmd for Visual Studio Windows
  • acdkbccenv.cmd for Borland
  • acdk_globals.linux for linux
  • acdk_globals.bsd for FreeBSD
  • acdk_globals.sunos-gcc for Solaris with GCC.


 Compiling using make files

For the distributed ACDK packages the project files and makefiles are already generated.

The platform makes does understand normally following commands:
  • all: install and compile
  • install: copy the header and configuration in ACDKHOME/include
  • compile: compile the sources
  • clean: removes the executables, libraries, .o/.obj files
  • clean-temps: removes only .o/.obj files
  • test: run test units


 Unix

global settings for the make process (for external libraries, like perl, python, wxWidgets, etc.) can ajusted in the file $ACDKHOME/acdk_globals.${target} (target = linux, etc.) If this file exists, it will be included from the project make files.

 Linux

To compile ACDK you must have installed GCC 2.95.2 or grater compiler on your system.


cd /usr/local/acdk/acdk
make -f acdk_all.linux all

 Notes for Linux

On computer with more CPU, add __SMP__ define in the $ACDKHOME/acdk_globals.linux

 Solaris

To compile ACDK you must have installed GCC 2.95.2 or grater compiler on your system.

cd /usr/local/acdk
make -f acdk_all.sunos-gcc all


 Windows Visual Studio

 Visual Studio 6

You need Visual Studio 6 SP3 or later to compile the packages on Windows (NT/2000).

cd d:\artefaktur\acdk
nmake -f acdk_all.nmake all

You can also use Visual Studio to open the provided .dsw, first you have to execute nmake -f acdk_all.nmake install to install the headers and configuration.

 Visual Studio .NET / 7

You can use the provided .dsw and .dsp also with Visual Studio .NET respectivally Visual C++ 7.
Before compiling with IDE, you have to execute nmake -f acdk_all.nmake install to install the headers and configuration.

 Visual Studio 2005 Express Beta

A good alternative to the free Borland compiler (see below) for MS Windows is the free (for personal use) http Visual Studio 2005 Express from Microsoft. Currently the support of ACDK for Visual Studio 2005 Express is much better than for the Borland compilers.

You can download Visual Studio 2005 Express (Beta) from Microsoft.
Additionally you need also the Platfrom SDK for your Operation system (for example XP).
The Platform SDK is also available from Microsoft for http download.
See also the instruction, how to http use the SDK with the Express Edition.

Open the ACDK .dsw/.dsp project files with Visual Studio C++ 2005. Visual Studio ask you to convert these project files into the new project format: Confirm with Yes to All.


Before compiling with IDE, you have to execute nmake -f acdk_all.nmake install to install the headers and configuration.

Due a bug in the IDE in the acdk_core com workspaces you may have to modify the linker settings for the acdk_core project:
add user32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib wsock32.lib to the input for the linker.
Also add this libraries to the input in all projects of the acdkx_com workspaces.

 Lancher scripts for the Visual Studio IDEs

Some ACDK projects (like  ACDK WX,  ACDK Perl,  ACDK Python,  ACDK Tcl) needs external libraries. These libraries are configured in batch files (see  External Libraries).
In the root path of ACDK there are also batch files to load these batch files start the Visual IDEs.
  • startvstudio6.cmd: to Start Visual Studio 6
  • startvstudio7.cmd: to Start Visual Studio 7/2003
  • startvstudio2005expr: to Start Visual Studio 2005 Express
You may have to edit these starter scripts to ajust the path to the IDEs.


 Borland C++-Builder X

The .bpgr and .cbx are for C++-Builder X for the Windows and Linux platforms. On both platforms only the debug compile mode is configured. C++-Builder can be download for free for personal use.

Before compiling ACDK with C++-Builder the header has to be installed (using Borland make (.bcc) on Windows or gnu make on linux).


 Borland BCC 5.5x

On the Windows platform the .bcc make files can be used in connection the free Borland command line compiler.

 Missing Header/Libraries

Some packages (f.e. acdk_perl, acdk_tcl, acdk_java, acdk_python, acdk_java, etc.) you need header to include and libraries to link. For these package you may have to correct the include and library settings in the make/project files.
Please refer also to the readmes of these packages.

 Compiling using acdkmake

Instead of using the platform 'make' you can also use acdkmake to build ACDK projects.

You need to download the acdk_tools package compiled for your platform.

!

The acdk_tools package is not always available as binary distribution.
In this case you have to compile acdk_core, acdk_text, acdk_make with the given native make files.

Extract the acdk_tools package in different directory than acdk packages.

ACDK packages:
d:\projects\acdk\acdk_core\*.*
/d/projects/acdk/acdk_core/*.*
                 etc.

ACDK tools:
d:\projects\acdk_tools\*.*
/d/projects/acdk_tools/*.*

Set in shell (cmd, bash) the environment variables ACDK_TOOLS_HOME=/d/projects/acdk_tools and ACDKHOME=/d/projects/acdk.

extend the PATH with /d/projects/acdk_tools/bin On unices you may also have to extend the LD_LIBRARY_PATH with this directory.

In the package directory should be a build.csf file, which is the make file for acdkmake.
/d/projects/acdk/acdk_core/build.csf.

In this directory just execute acdkmake to compile the project.

 Usual targets

ACDK build.csf files normally understands following make commands:
  • build
  • clean
  • install
  • compile
  • test
Please refer to the  ACDK Make documentation for more information.

 Required Libraries

For some packages additionally libraries are required:

 More information