Instructions for using ACE & TAO for ECE255

Instructions for using ACE & TAO for ECE255

This document describes how to setup and use the frozen Solaris and Sun C++ version of ACE and TAO have been setup under the directory /ecelib/ece35/ACE_wrappers/. This directory should be accessable from all ECE servers. There is also a Win32 setup document, as well.

By semesters end we will all be experts in the use of ACE and TAO - or maybe after the 2nd assignment ;)


Detailed Instructions

I have built ACE and TAO on Solaris 2.5.1 using both Sun C++ and GNU g++ (Note, egcs does not appear to be installed on SunOS 2.5.X hosts) - CC: WorkShop Compilers 4.2 21 Apr 1997 C++ 4.2 patch 104631-02 and gcc version 2.7.2.3

When building applications using ACE and TAO you will need to link in several libraries plus reference the appropriate directories for the header files. I have created a short script(s) to deal with setting up the ACE programming environment. It can be supplied with one argument to indicate whether g++ or sunCC should be used.

Execute the script like this to setup your environment:

bash and friends:

. /ecelib/ece35/ACE_wrappers/ace_setup [sunc++ | g++]

csh, tcsh and friends:

source /ecelib/ece35/ACE_wrappers/ace_setup.csh

Note the csh script does not take any arguments. If no arguments are specified then g++ is selected. For both scripts you can define an environment variable to select the compiler used, for example:

bash and friends, edit .profile or .bash_profile:

choice=sunc++

. /ecelib/ece35/ACE_wrappers/ace_setup

csh, tcsh and friends:

set choice = sunc++

source /ecelib/ece35/ACE_wrappers/ace_setup.csh

I copied the code from the first tutorial into /ecelib/ece35/ACE_wrappers/examples/Quoter to demonstrate how you can build an application.

So, to build this tutorial using g++ you would


Packages Needed

Use the pkginfo command to see what packages you currently have defined. To use the gnu c++ compiler (g++) you will need the gnu package. Add /dcs/bin to your path if it is not added already. Libraries and include files are in /dcs/packages/gnu.


Setting Your Login Environment

So you don't have to source the setup file each time you open a window, edit your login script (.cshrc, .profile or .bashrc) so that the script is automatically sources, plus you can make sure you are using gnu's make. path.

csh users:

Edit your .cshrc

vi ~/.cshrc

Than add the commands to source the script,

set choice=sunc++

source /ecelib/ece35/ACE_wrappers/ace_setup.csh

Also make sure you get GNUs make, I like to use an alias as gmake, that way I know which make I am using:

alias gmake /dcs/packages/gnu/bin/make

Save the file and quit vi (is there any other editor ?)

:wq