2013-05-14 1 views
2

내 시스템에 LEDA 라이브러리를 설치하고 싶습니다.LEDA 라이브러리 (C++ 라이브러리) 설치 리눅스

나는 다음과 같은 링크

http://www.algorithmic-solutions.info/free/d5.php

 
    Instruction given in read me file 



     2. Preparations 
    --------------- 

    Unpacking the LEDA distribution file 
    LEDA---.tar.gz will create the LEDA root 
    directory "LEDA---". You might want to rename 
    it or move it to some different place. Let denote the final 
    complete path name of the LEDA root directory. 

    To install and use the Unix object code of LEDA you have to modify 
    your environment as follows: 

    a) LEDAROOT: 
    Set the environment variable LEDAROOT to the LEDA root directory: 

    csh/tcsh: setenv LEDAROOT 

    sh/bash: LEDAROOT= 
     export LEDAROOT 

    b) Command Search Path: 
    Include $LEDAROOT/Manual/cmd into your command search path 
    (environment variable path (csh) or PATH (sh)) and call rehash (if 
    required by your system). 

    c) Shared Library: (for solaris, linux, irix, osf1) 
    If you planning to use shared libraries include $LEDAROOT into the 
    LD_LIBRARY_PATH search path. Then go to $LEDAROOT and type 
    make shared. This will construct the shared libraries from the static 
    libraries. 
    Please note: Building the shared library is not supported on each 
    platform. 

    d) xlman and demos: Go to $LEDAROOT and type make xlman to compile 
    and link LEDA's interactive manual reader xlman. Now you can start 
    xlman for reading and printing manual pages, starting demo programs 
    and browsing more release notes. 


    3. Compiling and linking application programs 
    --------------------------------------------- 

    a) Use the -I compiler flag to tell the compiler where to find the 
    LEDA header files. 

    CC (g++) -I$LEDAROOT/incl -c file.c 

    b) Use the -L compiler flag to tell the compiler where to find the 
    library (libleda.a/so) 

    CC (g++) -L$LEDAROOT file.o -lleda -lX11 -lm 

    If using windows on solaris systems you might have to link 
    with the system socket library and the network services library as 
    well: 
    CC (g++) ... -lleda -lX11 -lsocket -lnsl -lm 

    c) Compile and link simultaneously with 

    CC (g++) -I$LEDAROOT/incl -L$LEDAROOT file.c -lleda -lX11 -lm 

    You may want to ask your system adminstrator to install the header 
    files and library in the system's default directories. 
    Then you no longer have to specify header and library search paths on 
    the compiler command line. 

에서 LEDA 라이브러리를 다운로드 한 나는이 명령을 따라하지만 난

 
> make xlman 

    error 
    [email protected]:~/Documents/LEDA$ make xlman 
    make -C demo/xlman 
    make: *** demo/xlman: No such file or directory. Stop. 
    make: *** [xlman] Error 2 

사람이 설정 라이브러리에 저를 도와주세요 명령에 오류가 발생했습니다.

+0

환경 변수를 설정 했습니까? make는'demo/xlman' 디렉토리를 찾을 수 없으므로 지시 사항에서 (a)로 엉망이 될 수도 있습니다. '~/Documents/LEDA/demo/xlman'이 존재하는 경우 이벤트가 표시됩니다. – Greg0ry

+0

NO LEDA 폴더에 디렉토리 데모가 없습니다 – user69910

+0

데모 및 xlman 디렉토리를 직접 만들어야합니까? 해당 사이트에서 LEDA를 다운로드했습니다. http : //www.algorithmic-solutions.info/free/d5.php – user69910

답변

0

참고 : Leda 라이브러리 무료 버전의 경우 라이브러리를 사용하기 위해 패키지를 만들 필요가 없습니다. 단순히 작동하지 않습니다.

라이브러리를 사용하려면 단순히 컴파일 라인과 링커에 포함 시키십시오. 당신은 쉘에서 컴파일하는 경우

, 다음을 수행 (리눅스를 사용하는 가정) :

1. Set the env variable to the library folder e.g export LEDAROOT= /path/to/Leda 
2. Set the LD_LIBRARY_PATH env variable e.g export LD_LIBRARY_PATH=$LEDAROOT 

이 변수는 다음 링크를 실행하고 컴파일 할 수 있습니다 설정되어 있는지 확인합니다. 당신은 간단하게 할 수 있습니다

CC (g++) -I$LEDAROOT/incl -L$LEDAROOT file.c -lleda -lX11 -lm 

이것으로 당신은 잘되어야합니다.

IDE를 사용하는 경우 포함 설정 경로 (예 :/path/to/leda)를 프로젝트 설정에 추가하기 만하면됩니다.

이것은 모두 당신이해야 할 일입니다. 라이브러리 빌드가 작동하지 않습니다. 간단히 포함 시키십시오.