2011-06-09 48 views
0

我想创建一个共享对象。所以在Solaris文件这些都是我在做下面的步骤...奇怪的问题,努力创造在solaris I86共享对象

  1. 我有一个源代码代码尖齿......如果我们尝试建立,这将产生一个可执行文件..下面是命令创建
 
g++ -g -O2 -o .libs/jags-terminal jags_terminal-parser.o jags_terminal-scanner.o jags_terminal-ReadData.o .libs/jags-terminalS.o /JAGS-2.2.0/libltdl/./.libs/dlopen.a ../../libltdl/.libs/libltdlc.a ../../src/lib/.libs/libjags.so -L/usr/sfw/lib /usr/sfw/lib/libstdc++.so -lgcc_s -lm -Wl,-R -Wl,/usr/local/lib -Wl,-R -Wl,/usr/sfw/lib 
  1. 我现在想创建一个使用相同的流量变化的共享对象这个命令有点像这样
 
g++ -shared -o .libs/libjagsterminal.so jags_terminal-parser.o jags_terminal-scanner.o jags_terminal-ReadData.o .libs/jags-terminalS.o /JAGS-2.2.0/libltdl/./.libs/dlopen.a ../../libltdl/.libs/libltdlc.a ../../src/lib/.libs/libjags.so -L/usr/sfw/lib /usr/sfw/lib/libstdc++.so -lgcc_s -lm -Wl,-R -Wl,/usr/local/lib -Wl,-R -Wl,/usr/sfw/lib 
下面

是问题上面一行executiing以后。

 
std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)0x3ea  jags_terminal-ReadData.o 
_Unwind_Resume      0x4f9  jags_terminal-parser.o 
_Unwind_Resume      0x61f  jags_terminal-parser.o 
_Unwind_Resume      0xae7  jags_terminal-parser.o 
_Unwind_Resume      0xc0d  jags_terminal-parser.o 
_Unwind_Resume      0xe5f  jags_terminal-parser.o 
_Unwind_Resume      0xf7f  jags_terminal-parser.o 
_Unwind_Resume      0x10cf  jags_terminal-parser.o 
_Unwind_Resume      0x1371  jags_terminal-parser.o 
_Unwind_Resume      0x1a9b  jags_terminal-parser.o 
_Unwind_Resume      0x24f0  jags_terminal-parser.o 
_Unwind_Resume      0x2a95  jags_terminal-parser.o 
_Unwind_Resume      0x341a  jags_terminal-parser.o 
_Unwind_Resume      0x377a  jags_terminal-parser.o 
_Unwind_Resume      0x579c  jags_terminal-parser.o 
_Unwind_Resume      0x7021  jags_terminal-parser.o 
_Unwind_Resume      0x7417  jags_terminal-parser.o 
_Unwind_Resume      0x1169  jags_terminal-scanner.o 
_Unwind_Resume      0x17e0  jags_terminal-scanner.o 
_Unwind_Resume      0x685  jags_terminal-ReadData.o 
_Unwind_Resume      0x68e  jags_terminal-ReadData.o 
_Unwind_Resume      0x47  jags_terminal-parser.o 
_Unwind_Resume      0x79  jags_terminal-parser.o 
_Unwind_Resume      0x60  jags_terminal-parser.o 
_Unwind_Resume      0xd3  jags_terminal-parser.o 
_Unwind_Resume      0x33a  jags_terminal-parser.o 
_Unwind_Resume      0x3bc  jags_terminal-parser.o 
_Unwind_Resume      0x1dd  jags_terminal-parser.o 
_Unwind_Resume      0x299  jags_terminal-parser.o 
_Unwind_Resume      0x179  jags_terminal-parser.o 
_Unwind_Resume      0x87  jags_terminal-parser.o 
_Unwind_Resume      0x145  jags_terminal-parser.o 
_Unwind_Resume      0xb4  jags_terminal-ReadData.o 
ld: fatal: relocations remain against allocatable but non-writable sections 
collect2: ld returned 1 exit status 
+1

为什么被标记为“linux”? – 2011-06-09 02:13:25

回答

1

如果gcc使用/usr/ccs/bin/ld然后用-G