gpt4 book ai didi

linux - 尝试在 solaris i86 中创建共享对象时出现奇怪的问题

转载 作者:太空宇宙 更新时间:2023-11-04 11:37:48 25 4
gpt4 key购买 nike

我正在尝试在 solaris 中创建一个共享对象 .so 文件,这些是我正在执行的以下步骤...

  1. 我有一个源代码 jags...如果我们尝试构建它,它将生成一个可执行文件..下面是创建该文件的命令
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

下面是上面一行执行后的问题..

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.old: fatal: relocations remain against allocatable but non-writable sectionscollect2: ld returned 1 exit status

最佳答案

如果 gcc 使用 /usr/ccs/bin/ld 然后用 -G 替换 -shared/p>

关于linux - 尝试在 solaris i86 中创建共享对象时出现奇怪的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6287284/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com