[GiNaC-devel] Help

Chris Dams C.Dams at science.ru.nl
Wed Jun 14 21:12:58 CEST 2006


Dear Neofytos,

On Sat, 10 Jun 2006, Neofytos Mylona wrote:

> I have installed the CLN library in the following directory:
>
> /homes/nm305/MSc_project/code/call1/cln
>
> and ginac in
>
> /homes/nm305/MSc_project/code/call1/ginac


Yes, this is all very possible although I would not recommend it. The unix
directory structure has generally header files in an include-directory,
executables in a bin-directory, libraries in a lib-directory. A problem
with the approach that you seem to be taking is that the directories you
name will all separately get include/lib/bin-directories. If you decide to
stay with this approach you will have to make sure that the installed
files will be found. In particular, it will be quite usefull to add the
directories /homes/...whatever.../cln/bin and
/homes/...whatever.../ginac/bin to your path. That way the executable
cln-config and ginac-config can be found. Personally, I make the prefix of
packages that I install into my home directory always the home-directory
itself.  In that case I simply get subdirs bin, lib, include and so on in
my homedir and I only once need to make sure that they get found.

> I have my project code in
>
> /homes/nm305/MSc_project/code
>
> inside my code i add
>
> #include /homes/nm305/MSc_project/code/call1/ginac/include/ginac/ginac.h

Firstly, this needs quotes (") around the filename. Secondly, this is not
such a good idea. What if you move your code to someplace else? Then you
will have to change all those includes. To solve this you could, inside
your makefile, make use of ginac-config. Try typing "ginac-config
--cppflags" at the prompt and see what happens. The flags that you see
need to be used when compiling. Then you should also use #include
<ginac/ginac.h>. There also is the --libs option. If you have this, the
only thing you should need is setting your LD_LIBRARY_PATH to include the
places where the cln and ginac libraries are installed. Below I note that
you alreadly did this for the cln library but you will also need to add
the dir of the ginac library.

> setenv LD_LIBRARY_PATH /homes/nm305/MSc_Project/code/call1/cln/lib

Good luck,
Chris



More information about the GiNaC-devel mailing list