Change picture:

Choose file:

Installation of Dao Virtual Machine (DVM)

1 Compiling and Installation

 Top

Under Linux with GCC compiler, simply type:
shell:  make
shell:  make  install
This will compile the DVM with most features enabled and install it at /usr/local/dao .

One may modify the Makefile to change the compiler, or disable some Dao language features, or change the installation location.

Under Windows, it can be compiled with MinGW Developer studio and Microsoft Visual Studio Express. One just has to create a project and add the source files (excluding daoMaindl.h) into the project, and then add additional preprocess definitions such as,
-DDAO_WITH_AFC,
-DDAO_WITH_JIT,
-DDAO_WITH_MPI,
-DDAO_WITH_MACRO,
-DDAO_WITH_THREAD,
-DDAO_WITH_NETWORK,
-DDAO_WITH_NUMARRAY
and add additional linking libraries: msvcp60 for MinGW, and ws2_32 , winmm , msvcprt for MS visual studio. Now the DVM should be built without problem.

A makefile for compiling using MinGW under Windows is also included in the release.

Compiling the DVM under OS X is also possible.

2 Configuring Paths

 Top

The paths should be properly configured for Dao to load modules. To have an idea how the paths work for this purpose, one should refer to the Path Management section in the quick guide documentaion. Basically, one need create one file named addpath.dao with the following line:
@@PATH(  +  "YOUR_INSTALLATION_FOLD")
and put it at one of the following 3 locations:
  1. /usr/lib/dao for linux, or C:\dao for windows;
  2. your_home_dir/dao
  3. path defined by environment variable DAO_DIR
If you want to use the binaries coming with the distribution package, you may simple put the fold of the unzipped package as the YOUR_INSTALLATION_FOLD in that addpath.dao file.

3 Extra Configuration

 Top

Extra configuration can be set by creating file(s) named dao.conf . When the Dao interpreter is started, it will search in the following folds for a file with such name, if found, the current configuration of the interpreter will be overrided by what is specified in the file.
  1. /usr/local/dao for Linux (or C:\dao for Windows);
  2. directory specified by the environment variable DAO_DIR ;
  3. the current directory where the interpreter is invoked.
All the found files with such name in these folds are used to change the configuration, so that, the first found dao.conf file can override the internal configuration; and the following dao.conf files can override the configurations set by the previous files.

An example configuration file looks like,
# number of CPUs
cpu  =  2

# just in time compiling
jit  =  yes

# typed virtual machine code
typedcode  =  yes

# incremental compiling
incompile  =  yes

# safe running mode
safe  =  no

view count 607 times
created at 2009-02-25, 23:17 GMT
modified at 2009-03-05, 23:22 GMT

12 3
456789 10
111213141516 17
181920212223 24
2526272829 30 31

fu: Many thanks (Jul.04,04:29)

klabim: fixed Hi, great, now my test works now :- ). (Jun.30,17:51)

Nightwalker: Few suggestions (Jul.03,14:37)

This site is powered by Dao
Copyright (C) 2009,2010, daovm.net.
Webmaster: admin@daovm.net