stdio performance in tango, stdlib, and perl

Andrei Alexandrescu (See Website For Email) SeeWebsiteForEmail at erdani.org
Thu Mar 22 13:23:37 PDT 2007


Sean Kelly wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
>> Several documented attempts of installing Tango failed for me, so in 
>> the end I figured some way to get programs to compile with a special 
>> command line and a modification of dmd.conf. I need to modify dmd.conf 
>> whenever I switch between Phobos programs and Tango programs.
> 
> This page describes one way to use Tango and Phobos together: 
> http://www.dsource.org/projects/tango/wiki/PhobosTangoCooperation  It's 
> Win32-oriented, but the approach should be essentially the same for 
> Linux.  One issue with install instructions is that the installation 
> procedure is in flux as we try to simplify/automate it, and some of the 
> documentation is lagging behind.

Here's what worked for me. The script also allows compiling dmd programs 
on the fly. For some reason I needed to include libtango.a in the DFLAGS 
variable.

-----------------------------------------
#!/bin/sh

D_BIN=$(dirname $(which dmd))
WHICH=$1

if [ "$WHICH" = "phobos" ]; then
     DFLAGS="-I$D_BIN/../src/phobos -L-L$D_BIN/../lib 
-L-L$D_BIN/../../dm/lib"
elif [ "$WHICH" = "tango" ]; then
     DFLAGS="-I$D_BIN/../../tango-0.96-bin -version=Tango -version=Posix"
     DFLAGS="$DFLAGS -L-L$D_BIN/../../tango-0.96-bin/lib libtango.a"
else
     echo "Please pass either phobos or tango as the first argument"
     WHICH=""
fi

if [ ! -z "$WHICH" ]; then
     shift
     if [ "$*" != "" ]; then
	dmd $*
     else
	export DFLAGS
	echo "dmd configured for $WHICH"
     fi
fi
-----------------------------------------


Andrei



More information about the Digitalmars-d mailing list