C++ 安装目录在哪里?
我下载了莱达 但当我进行安装时,有一个问题:目录incl/LEDA/INCLUDE不存在 这是生成文件C++ 安装目录在哪里?,c++,leda,C++,Leda,我下载了莱达 但当我进行安装时,有一个问题:目录incl/LEDA/INCLUDE不存在 这是生成文件 SHELL=/bin/sh cc = $(shell basename $(CURDIR)) sys = $(shell cmd/leda.sys) instdir = /LEDA/INSTALL/$(sys)/$(cc) default: lib kernel: ./kernel_config $(MAKE) lib xlman all: lib tests
SHELL=/bin/sh
cc = $(shell basename $(CURDIR))
sys = $(shell cmd/leda.sys)
instdir = /LEDA/INSTALL/$(sys)/$(cc)
default: lib
kernel:
./kernel_config
$(MAKE) lib xlman
all: lib tests
install: FORCE
cp -r -L incl /LEDA/INSTALL/$(sys)
if [ -f leda.lib ]; then cp leda.lib $(instdir); fi
if [ -f leda.dll ]; then cp leda.dll $(instdir); fi
if [ -f libleda.a ]; then cp libleda.a $(instdir); fi
if [ -f libleda.so ]; then cp libleda.so $(instdir); fi
FORCE: lib
#------------------------------------------------------------------------------
# libraries
#------------------------------------------------------------------------------
lib: .license
@if [ -f .license -a -d src ]; then $(MAKE) -C src; fi
@if [ -f .license -a -d src1 ]; then $(MAKE) -C src1; fi
@if [ -f .license -a -f closelib ]; then ./closelib; fi
@if [ -f .license -a -f static.mk ]; then $(MAKE) static; fi
@if [ -f .license -a -f shared.mk ]; then $(MAKE) shared; fi
touch:
@if [ -f .license -a -d src ]; then $(MAKE) -C src touch; fi
@if [ -f .license -a -d src1 ]; then $(MAKE) -C src1 touch; fi
@if [ -f .license -a -f static.mk ]; then $(MAKE) static; fi
@if [ -f .license -a -f shared.mk ]; then $(MAKE) shared; fi
nogui: .license
mv libleda.a libleda.a.gui
mv libleda.so libleda.so.gui
mv src/graphics src/graphics_
mv src1/graphics src1/graphics_
$(MAKE) touch
mv src/graphics_ src/graphics
mv src1/graphics_ src1/graphics
mv libleda.a libleda.so no_gui
mv libleda.a.gui libleda.a
mv libleda.so.gui libleda.so
gui: .license
$(MAKE) touch
lib0: .license
@if [ -f .license -a -d src ]; then $(MAKE) -C src; fi
@if [ -f .license -a -f closelib ]; then ./closelib; fi
@if [ -f .license -a -f static.mk ]; then $(MAKE) static; fi
@if [ -f .license -a -f shared.mk ]; then $(MAKE) shared; fi
lib1: .license
@if [ -f .license -a -d src1 ]; then $(MAKE) -C src1; fi
@if [ -f .license -a -f closelib ]; then ./closelib; fi
@if [ -f .license -a -f static.mk ]; then $(MAKE) static; fi
@if [ -f .license -a -f shared.mk ]; then $(MAKE) shared; fi
libL1:
cp libL.a libL1.a
mv src/system/_leda.o src/system/_leda_orig.o
$(MAKE) -C src/system -i L=L1 DFLAGS=-DLEDA_CHECK_LICENSE
mv src/system/_leda_orig.o src/system/_leda.o
agd:
$(MAKE) -C AGD
@if [ -f AGD/static.mk ]; then $(MAKE) -f AGD/static.mk; fi
@if [ -f AGD/shared.mk ]; then $(MAKE) -f AGD/shared.mk; fi
shared: .license
@if [ -f .license ]; then \
if [ -f shared.mk ]; then \
echo "$(MAKE) -f shared.mk"; $(MAKE) -f shared.mk; \
if [ -f libAGD.a ]; then \
echo "$(MAKE) -f shared.mk agd"; $(MAKE) -f shared.mk agd; fi; \
else echo "Not configured to build shared libs."; fi; fi
static: .license
@if [ -f .license ]; then $(MAKE) -f static.mk; fi
.license:
@/bin/sh confdir/util/unix/license.sh
#------------------------------------------------------------------------------
# programs
#------------------------------------------------------------------------------
xlman: .license
@if [ -f .license ]; then \
echo "$(MAKE) -C demo/xlman "; $(MAKE) -C demo/xlman; fi
static_xlman: .license
@if [ -f .license ]; then \
echo "$(MAKE) -C demo/xlman "; $(MAKE) -C demo/xlman static_xlman; fi
demos: .license
@if [ -f .license ]; then \
if [ -d demo ]; then $(MAKE) -C demo; fi; fi
tests: .license
@if [ -f .license ]; then \
if [ -d test ]; then $(MAKE) -C test; fi; fi
#------------------------------------------------------------------------------
# manual
#------------------------------------------------------------------------------
man: .license
@if [ -f .license ]; then \
echo "$(MAKE) -C Manual/MANUAL ";\
$(MAKE) -C Manual/MANUAL; fi
pdfman: .license
@if [ -f .license ]; then \
echo "$(MAKE) -C Manual/MANUAL pdf";\
$(MAKE) -C Manual/MANUAL pdf; fi
dvi: .license
@if [ -f .license ]; then \
echo "$(MAKE) -C Manual/MANUAL dvi";\
$(MAKE) -C Manual/MANUAL dvi; fi
#------------------------------------------------------------------------------
# cleaning up
#------------------------------------------------------------------------------
del:
@if [ -d src ]; then $(MAKE) -C src clean; fi
@if [ -d src1 ]; then $(MAKE) -C src1 clean; fi
@if [ -d prog ]; then $(MAKE) -C prog del; fi
@if [ -d test ]; then $(MAKE) -C test del; fi
@if [ -d demo ]; then $(MAKE) -C demo del; fi
rm -f lib*.a lib*.so lib*.sl lib*.lib leda.dll leda.lib
clean:
@if [ -d src ]; then $(MAKE) -C src clean; fi
@if [ -d src1 ]; then $(MAKE) -C src1 clean; fi
@if [ -d prog ]; then $(MAKE) -C prog clean; fi
@if [ -d test ]; then $(MAKE) -C test clean; fi
@if [ -d demo ]; then $(MAKE) -C demo clean; fi
这是安装指南
********************************************************************
* *
* LEDA *
* *
* UNIX OBJECT CODE INSTALLATION *
* *
********************************************************************
Remark: This file describes the situation in a LEDA package.
1. Files and Directories
------------------------
To compile and link your programs with LEDA, the LEDA main directory
should contain at least the following files and subdirectories:
Readme.txt Readme File
Install/unix.txt this file
incl/ the LEDA include directory
libleda.a (libleda.so) basic library
The static library has extension .a. If a shared library is provided
it has extension .so.
2. Preparations
---------------
Unpacking the LEDA distribution file
LEDA-<ver>-<sys>-<cc>.tar.gz will create the LEDA root
directory "LEDA-<ver>-<sys>-<cc>". You might want to rename
it or move it to some different place. Let <LEDA> 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 <LEDA>
sh/bash: LEDAROOT=<LEDA>
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.
4. Example programs and demos
-----------------------------
The source code of all example and demo programs can be found in
$LEDAROOT/test and $LEDAROOT/demo. Goto $LEDAROOT/test or
$LEDAROOT/demo and type "make" to compile and link all test or demo
programs, respectively.
5. User Manual
--------------
Postscript, PDF, and HTML versions of the manual are available at
http://www.algorithmic-solutions.com
********************************************************************
* *
*莱达*
* *
*UNIX目标代码安装*
* *
********************************************************************
备注:该文件描述了LEDA包中的情况。
1.文件和目录
------------------------
要编译程序并将其与LEDA链接,请访问LEDA主目录
应至少包含以下文件和子目录:
Readme.txt自述文件
将/unix.txt文件安装到此文件
incl/LEDA include目录
libleda.a(libleda.so)基本库
静态库具有扩展名.a。如果提供了共享库
它有扩展,所以。
2.准备工作
---------------
解包LEDA分发文件
LEDA---.tar.gz将创建LEDA根
目录“LEDA----”。您可能需要重命名
或者把它移到另一个地方。让我们来表示最后的结果
LEDA根目录的完整路径名。
要安装和使用LEDA的Unix目标代码,必须修改
您的环境如下所示:
a) 莱达罗特:
将环境变量LEDAROOT设置为LEDA根目录:
csh/tcsh:setenv LEDAROOT
sh/bash:LEDAROOT=
出口莱达罗
b) 命令搜索路径:
在命令搜索路径中包含$LEDAROOT/Manual/cmd
(环境变量路径(csh)或路径(sh))并调用rehash(如果
您的系统需要)。
c) 共享库:(适用于solaris、linux、irix和osf1)
如果您计划使用共享库,请在
LD_库_路径搜索路径。然后转到$LEDAROOT并键入
分享。这将从静态数据库构建共享库
图书馆。
请注意:每个服务器上都不支持生成共享库
站台。
d) xlman和演示:转到$LEDAROOT并键入makexlman进行编译
并链接莱达的交互式手册阅读器xlman。现在你可以开始了
xlman用于阅读和打印手册页,启动演示程序
浏览更多发行说明。
3.编译和链接应用程序
---------------------------------------------
a) 使用-I编译器标志告诉编译器在哪里可以找到
LEDA头文件。
CC(g++)-I$LEDAROOT/incl-c file.c
b) 使用-L编译器标志告诉编译器在哪里可以找到
图书馆(libleda.a/so)
CC(g++)-L$LEDAROOT文件.o-lleda-lX11-lm
如果在solaris系统上使用windows,则可能必须链接
将系统套接字库和网络服务库作为
好:
CC(g++)-lleda-lX11-lsocket-lnsl-lm
c) 与同时编译和链接
CC(g++)-I$LEDAROOT/incl-L$LEDAROOT file.c-lleda-lX11-lm
您可能需要要求系统管理员安装标头
系统默认目录中的文件和库。
这样,您就不必再在上指定标题和库搜索路径
编译器命令行。
4.示例程序和演示
-----------------------------
所有示例和演示程序的源代码都可以在中找到
$LEDAROOT/测试和$LEDAROOT/演示。转到$LEDAROOT/测试或
$LEDAROOT/demo并键入“make”以编译和链接所有测试或演示
项目,分别。
5.用户手册
--------------
手册的Postscript、PDF和HTML版本可在
http://www.algorithmic-solutions.com
我需要一个共享的图书馆。但我无法理解如何安装它。我是新来的LEDA end makefile。你能帮我一步一步地解释完吗
如果我把make share放进去,结果是:
未配置为生成共享库。
我能做什么?根据您拥有的库(静态库(应该始终存在)或共享库,makefile会分支成另外两个makefile。您的输出表明,在makefile搜索的任何位置都没有适当的共享库。您是否按照安装指南(第2.c节)中的建议将变量
$LEDAROOT
添加到LD_LIBRARY_PATH
(在sh/bash:导出LD_LIBRARY_PATH=“$LEDAROOT:$LD_LIBRARY_PATH”
)中
否则,可能值得尝试使用
makestatic
进行构建。只有在这个构建成功完成后,make install
才能工作。你需要什么共享库?我会一步一步告诉你我做了什么:1 LEDAROOT=/home/usr/LEDA-6.3-free-fedora-core-8-64-g++-4.1.2/LD_library_PATH=“$LEDAROOT:$LD_library_PATH”如果我做了end make static,autput会说static.mk不存在,请确保static.mk在您构建的目录中。