LEDA library(C++ library) setup linux -
i want set leda library in system.
i have downloaded leda library following link
http://www.algorithmic-solutions.info/free/d5.php
instruction given in read me file 2. preparations --------------- unpacking leda distribution file leda---.tar.gz create leda root directory "leda---". might want rename or move different place. let denote final complete path name of leda root directory. install , use unix object code of leda have modify environment follows: a) ledaroot: set environment variable ledaroot leda root directory: csh/tcsh: setenv ledaroot sh/bash: ledaroot= export ledaroot b) command search path: include $ledaroot/manual/cmd command search path (environment variable path (csh) or path (sh)) , call rehash (if required system). c) shared library: (for solaris, linux, irix, osf1) if planning use shared libraries include $ledaroot ld_library_path search path. go $ledaroot , type make shared. construct shared libraries static libraries. please note: building shared library not supported on each platform. d) xlman , demos: go $ledaroot , type make xlman compile , link leda's interactive manual reader xlman. can start xlman reading , printing manual pages, starting demo programs , browsing more release notes. 3. compiling , linking application programs --------------------------------------------- a) use -i compiler flag tell compiler find leda header files. cc (g++) -i$ledaroot/incl -c file.c b) use -l compiler flag tell compiler find library (libleda.a/so) cc (g++) -l$ledaroot file.o -lleda -lx11 -lm if using windows on solaris systems might have link system socket library , network services library well: cc (g++) ... -lleda -lx11 -lsocket -lnsl -lm c) compile , link simultaneously cc (g++) -i$ledaroot/incl -l$ledaroot file.c -lleda -lx11 -lm may want ask system adminstrator install header files , library in system's default directories. no longer have specify header , library search paths on compiler command line.
i followed these instruction got error in command
> make xlman error coredump@coredump-vpccb15fg:~/documents/leda$ make xlman make -c demo/xlman make: *** demo/xlman: no such file or directory. stop. make: *** [xlman] error 2
someone please me setup library.
note: free version of leda library, don't have build package use library. doesn't work.
to use library include in compile line , linker.
if compiling shell (assuming using linux), following:
1. set env variable library folder e.g export ledaroot= /path/to/leda 2. set ld_library_path env variable e.g export ld_library_path=$ledaroot
verify variables set can compile , link , run. can do
cc (g++) -i$ledaroot/incl -l$ledaroot file.c -lleda -lx11 -lm
with should go.
if using ide, add include path (i.e /path/to/leda) project settings.
this have do. building library not work. include it
Comments
Post a Comment