Solaris 8 (Intel 平台版) 1/01 发行说明更新

在 Solaris 8 操作环境中编译 Motif 程序

当您连接到一个已经在 Solaris 2.4、2.5、2.5.1 或 2.6 操作环境中编译过的共享库并且此库也使用了 Motif 应用程序编程接口(API) 时,则在 Solaris 8 操作环境中编译 Motif 程序会出现问题。

Motif 程序使用 Motif 2.1 版而旧的共享库使用 Motif 1.2 版时会发生核心转储。这不是二进制兼容性问题,因为在 Solaris 2.4、2.5、2.5.1 或 2.6 操作环境中编译的应用程序应当能够在 Solaris 8 操作环境中正常运行。

解决方法:如果您有一个直接连接到 Motif 库的旧的共享库,并且要在 Solaris 8 操作环境中编译同时链接到 Motif 和旧的共享库的程序,请使用以下行来编译:


cc foo.c -o program -DMOTIF12_HEADERS -I/usr/openwin/include -I/usr/dt/include -lXm12 -lXt -lX11
其中 program 是您正在编译的程序名称。