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完
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章