solaris10下配置wxwidgets包

1.安装GCC

到.http://www.sunfreeware.com/indexintel10.html    下载

libiconv-1.11-sol10-x86-local.gzgcc-3.4.6-sol10-x86-local.gz;glib-2.13.0-sol10-x86-local

都是二进制代码包

(1).安装libiconv

①、解压缩

$ gunzip libiconv-1.11-sol10-x86-local.gz

②、安装

#pkgadd -d ./libiconv

(2).安装GCC

 ①、 解压缩 
$ gunzip gcc-3.4.6

②、 安装
解压缩之后的就是安装包。在solaris操作系统中安装包有一套专门的命令和程序
#pkgadd -d ./gcc-3.4.6

③、 调试
以gcc-3.4.6为例,GCC缺省安装的路径为/usr/local/,这个路径可能不在
用户的PATH变量表示的范围内,所以需要对PATH变量更新,方便使用GCC。

对使用csh的用户:
% setenv PATH=$PATH :/usr/local/bin
对使用sh的用户:
$ PATH=$PATH :/usr/local/bin
$ export PATH

如果不想每次使用GCC都要更新PATH环境变量,可以将以上内容写在用户初始文件
中:
对csh用户: 写在用户主目录下的.cshrc文件中
对sh用户:写在用户主目录下的.profile文件中 

④、 常见问题
Q:解压缩gcc-version.gz文件时,提示"gunzip 没找到"
A:有可能是你没有事先安装gzip/gunzip软件,首先下载gzip for 相应OS,然后安装。
还有可能是gzip/gunzip没在PATH搜索路径中,查看/usr/local/bin,如果有,使用gunzip时加上绝对路径。

Q: 成功安装了gcc,在编译软件时出错"can't find gcc"。
A: 最大的可能就是gcc的执行目录没有在用户当前的搜索路径PATH中。
Q: 怎么安装使用c++编译器

A: gcc提供了g++作为c++的替代,一般还要使用g++的库来支持,下载针对你的OS版本的libstdc++包,

然后安装。安装完毕,要设置LD_LIBRARY_PATH环境变量,让libstdc++库能被其它程序利用
$LD_LIBRARY_PATH=/usr/local/lib
$export LD_LIBRARY_PATH

2.安装wxwidgets 

①、下载

http://www.wxwidgets.org/downloads/

 ①、 解压缩  wxWidgets


②、 安装
解压缩之后的就是安装包。在solaris操作系统中安装包有一套专门的命令和程序
#pkgadd -d ./wxWidgets

进入wxWidgets解压后的目录

mkdir wxbuild

cd wxbuild

. ./configure

出错了!

check fo ar .... no

ar is needed to build wxwidgets

ar 所属套件名称叫做 binutils
http://download.chinaunix.net/download/0001000/900.shtml下载

也可以不安装binutils
在Solaris 10下你可以在/usr/xpg4/bin/下找到ar。

设置PATH环境变量PATH=:/usr/xpg4/bin然后重启就可以了,下一步:
 make

su <type root password>

 make install
 ldconfig 注:配置动态链接库路径用的solaris 10下没有这个命令
 在solaris中如何配置库路径?

命令 crle


unset LD_LIBRARY_PATH
mkdir /var/ld

crle -l /lib -l /usr/lib -l /usr/local/lib
则建立ld.config

english原文

Document ID: 3057

SYNOPSIS:     How to configure runtime linking in Solaris 8.

DETAIL DESCRIPTION:


With the advent of 64-bit Solaris with Solaris 7 and now 8, the use of
the environment variable LD_LIBRARY_PATH has become frowned upon, as it
can break the management of linking 32-bit and 64-bit executables against
different library versions.

Also, in the Linux Operating System, there is a configurable run-time
linking system managed through the ld.so.config file and the ldconfig
command which leads to a far more efficient means of finding dynamic
libraries.

How are we supposed to solve the first point, and does/will Solaris
offer us something like the second?


SOLUTION SUMMARY:


There is a new command and file in Solaris 8 that gives very similar, but
better and finer grained, functionality to that seen in Linux.  The
command is crle(1) and the file is ld.config, which exists in /var/ld for
32-bit executables and /var/ld/64 for 64-bit executables, allowing
separate configurations for each.

This new command allows the configuration of dynamic library search
paths, cacheing of the locations of dynamic libraries, and the setting of
alternate object files for standard libraries, as well as a number of
other options - see the manual page for full details.

As an example, the following command:

  crle -l /usr/lib -l /usr/local/lib -i /usr/lib -i /usr/local/lib /
  -a /usr/lib/libthread.so.1 -o /usr/lib/lwp

has the following effect:

o  Sets the default 32-bit library path to /usr/lib:/usr/local/lib;
o  Creates a cached list of libraries in these directories;
o  Tells ld.so to use the libthread.so in /usr/lib/lwp instead.

The first is basically a system-wide version of the LD_LIBRARY_PATH
environment variable that only effects 32-bit applications.  Note that
LD_LIBRARY_PATH is still honoured, but it's use is not recommended.

The second means that, rather than search each directory in the library
path in turn for each library when it starts up a new executable, ld.so
can instead simply consult the cache file to find it, speeding up
application start times considerably.  This offers functionality matching
the Linux ldconfig command.

The third example is a simple method to experiment with the new, single
level threads library supplied in Solaris 8 which is expected to provide
better performance for multithreaded applications, especially on single
processor systems.

These are just some of the options available with crle - it is highly
recommended that the reader acquaints themselves fully with the crle(1)
man page before experimenting with it, and there are many more examples
there, too.


DATE APPROVED: 05/15/00

KEYWORDS:     ld ld.so ldconfig crle ld.so.conf link LD_LIBRARY_PATH

OS RELEASE:   8完
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值