Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/139.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ Ununtu 12.04至mipsel交叉编译问题:/opt/buildroot-gcc342/bin/mipsel-linux-uclibc-ar:libsupc++;。答:没有这样的文件或目录_C++_Ubuntu_Cross Platform_Mips_Embedded Linux - Fatal编程技术网

C++ Ununtu 12.04至mipsel交叉编译问题:/opt/buildroot-gcc342/bin/mipsel-linux-uclibc-ar:libsupc++;。答:没有这样的文件或目录

C++ Ununtu 12.04至mipsel交叉编译问题:/opt/buildroot-gcc342/bin/mipsel-linux-uclibc-ar:libsupc++;。答:没有这样的文件或目录,c++,ubuntu,cross-platform,mips,embedded-linux,C++,Ubuntu,Cross Platform,Mips,Embedded Linux,我使用SDK和Ubuntu12.04交叉编译基于mipsel的板。但我的系统崩溃了,我重新安装了ubuntu12.04并试图设置环境并使用SDK运行make 我不太了解交叉编译,因此在备份数据时,我只备份/opt/buildroot-gcc342/文件夹,其中包含SDK所需的交叉编译器、库和头 所以现在我希望在/opt/buildroot-gcc342/setup和更新Ubuntu12.04之后一切都正常,但是SDK在uClibc++make time中链接到libsupc++.a时出错 详细错

我使用SDK和Ubuntu12.04交叉编译基于mipsel的板。但我的系统崩溃了,我重新安装了ubuntu12.04并试图设置环境并使用SDK运行make

我不太了解交叉编译,因此在备份数据时,我只备份/opt/buildroot-gcc342/文件夹,其中包含SDK所需的交叉编译器、库和头

所以现在我希望在/opt/buildroot-gcc342/setup和更新Ubuntu12.04之后一切都正常,但是SDK在uClibc++make time中链接到libsupc++.a时出错

详细错误如下:

root@HOME_PC:/home/Documents/mips_sdk/source# make
make[1]: Entering directory `/home/Documents/mips_sdk/source/uClibc++'
for dir in bin include src ; do \
        make -C $dir all; \
    done
make[2]: Entering directory `/home/Documents/mips_sdk/source/uClibc++/bin'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/Documents/mips_sdk/source/uClibc++/bin'
make[2]: Entering directory `/home/Documents/mips_sdk/source/uClibc++/include'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/Documents/mips_sdk/source/uClibc++/include'
make[2]: Entering directory `/home/Documents/mips_sdk/source/uClibc++/src'
make -C abi/libsupc all
make[3]: Entering directory `/home/Documents/mips_sdk/source/uClibc++/src/abi/libsupc'
"/opt/buildroot-gcc342/bin"/mipsel-linux-uclibc-ar x libsupc++.a
/opt/buildroot-gcc342/bin/mipsel-linux-uclibc-ar: libsupc++.a: No such file or directory
make[3]: *** [libsupc] Error 9
make[3]: Leaving directory `/home/Documents/mips_sdk/source/uClibc++/src/abi/libsupc'
make[2]: *** [libsupc] Error 2
make[2]: Leaving directory `/home/Documents/mips_sdk/source/uClibc++/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/Documents/mips_sdk/source/uClibc++'
make: *** [uClibc++_only] Error 2
root@HOME_PC:/home/Documents/mips_sdk/source# 
我通常使用tar-zip文件夹,它可以在旧的Ubuntu安装中正常工作,所以这也是untar源代码,应该可以,我缺少的东西应该在Ubuntu 12.04中

环境变量或库路径的其他设置?? 有人知道我错过了什么吗

libsupc++。文件位于/opt/buildroot-gcc342/lib/文件夹中,但链接器似乎无法获取此路径。我试着设置:

导出CONFIG_LIBDIR=/opt/buildroot-gcc342/lib:$CONFIG_LIBDIR

但是没有运气

我还尝试在uClibc++中链接此库,但随后出现了此错误和其他一些错误

有人能帮忙吗


提前谢谢。

最后我自己解决了这个问题。我指的是对我有效的解决方案,它可能会帮助其他人。我发现uClibc++中的这种链接错误非常常见,如果你只是在谷歌上搜索它,但我发现许多建议的技巧没有逻辑意义。但我得到了一些逻辑上的解释和解决方案,至少对我自己有效……所以问题是,在备份系统时,我使用了“cp-r目录”和rsync,但这两种方法对备份SDK都不好,这是我现在意识到的,我强烈建议对任何备份都使用tar。tar是备份SDK时唯一应该使用的方法,因为它会将所有链接按原样归档到压缩文件夹中,这在Linux中进行备份时是最重要的。ls-l到uClibc++使用了很少的链接,这导致了链接错误。我的SDK源代码来自tar,但我的/opt/buildroot-gcc342备份是cp-r和rsycn,所以那里的链接都不存在。最后,我从tar获得了/opt/、SDK,我使用ls-l进行的检查显示,在这个文件夹中有许多链接,它们与我以前的linux设置一样工作正常,没有任何错误

最后我自己解决了这个问题。谢谢你发布你自己的解决方案,这对我真的很有帮助~