首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >/usr/bin/ld:无法打开输出文件assimp2json:是一个目录

/usr/bin/ld:无法打开输出文件assimp2json:是一个目录
EN

Stack Overflow用户
提问于 2016-07-01 21:39:28
回答 1查看 1.8K关注 0票数 0

构建assimp2json在经过一些修修补补之后工作得很好,但是Readme.md对构建assimp并不是很清楚。从github dot com/assimp/assimp2json构建时,会出现错误"/usr/bin/ld:无法打开输出文件assimp2json: Is a directory“。在网上搜索这个问题时,我发现用其他软件删除冲突的目录是可以的,但这里不是这样,内容是必需的。此外,重命名文件系统上的目录和CMakeLists.txt中对目录的引用也不起作用,因为这会导致输出文件名被更改为新目录名称的名称。在make手册中,我找不到更改输出路径的选项。在网络上搜索了更多之后,我感觉被卡住了。

减少错误周围的sussinct输出:“

代码语言:javascript
复制
Linking CXX shared library ../../lib/libassimp.so
[ 97%] Built target assimp
Scanning dependencies of target assimp2json
[ 98%] Building CXX object CMakeFiles/assimp2json.dir/assimp2json/main.cpp.o
[ 98%] Building CXX object CMakeFiles/assimp2json.dir/assimp2json/json_exporter.cpp.o
[ 99%] Building C object CMakeFiles/assimp2json.dir/assimp2json/cencode.c.o
[100%] Building CXX object CMakeFiles/assimp2json.dir/assimp2json/mesh_splitter.cpp.o
Linking CXX executable assimp2json
/usr/bin/ld: cannot open output file assimp2json: Is a directory
collect2: error: ld returned 1 exit status
CMakeFiles/assimp2json.dir/build.make:162: recipe for target 'assimp2json' failed
make[2]: *** [assimp2json] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/assimp2json.dir/all' failed
make[1]: *** [CMakeFiles/assimp2json.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

“。

我用来构建的命令:“

代码语言:javascript
复制
git clone https://github.com/assimp/assimp2json
cd assimp2json
git submodule init
git submodule update
cmake CMakeLists.txt
make

“。

我还尝试了GitHub.com/assimp/assimp/blob/ CMakeLists.txt / -G中所述的"cmake master master 'Unix Makefiles'“,但没有效果。

由于github dot com/assimp/assimp2json是从github dot com/acgessler/assimp2json派生出来的,它的提交次数更多(2013比2015),所以我也尝试使用相同的命令构建它。并将assimp/cmake-modules/AddGTest.cmake的第34行从"GIT_REPOSITORY github dot com/ chromium.googlesource /google/googletest“改为"GIT_REPOSITORY github dot com/google/googletest/”。

这取得了一些进展,但还不够:“

代码语言:javascript
复制
Linking CXX shared library ../../lib/libassimp.so
[ 80%] Built target assimp
Scanning dependencies of target assimp2json
[ 80%] Building CXX object CMakeFiles/assimp2json.dir/assimp2json/main.cpp.o
[ 81%] Building CXX object CMakeFiles/assimp2json.dir/assimp2json/json_exporter.cpp.o
[ 81%] Building C object CMakeFiles/assimp2json.dir/assimp2json/cencode.c.o
[ 82%] Building CXX object CMakeFiles/assimp2json.dir/assimp2json/mesh_splitter.cpp.o
Linking CXX executable bin/assimp2json
[ 82%] Built target assimp2json
Scanning dependencies of target gtest
[ 82%] Creating directories for 'gtest'
[ 83%] Performing download step (git clone) for 'gtest'
-- gtest download command succeeded.  See also /opt/assimp2json/assimp/test/gtest/src/gtest-stamp/gtest-download-*.log

[ 84%] No patch step for 'gtest'
[ 84%] Performing update step for 'gtest'
Already on 'master'
Your branch is up-to-date with 'origin/master'.
[ 84%] Performing configure step for 'gtest'
-- gtest configure command succeeded.  See also /opt/assimp2json/assimp/test/gtest/src/gtest-stamp/gtest-configure-*.log

[ 85%] Performing build step for 'gtest'
-- gtest build command succeeded.  See also /opt/assimp2json/assimp/test/gtest/src/gtest-stamp/gtest-build-*.log

[ 86%] No install step for 'gtest'
[ 86%] Completed 'gtest'
[ 86%] Built target gtest
Scanning dependencies of target unit
[ 86%] Building C object assimp/test/CMakeFiles/unit.dir/unit/CCompilerTest.c.o
[ 87%] Building CXX object assimp/test/CMakeFiles/unit.dir/unit/Main.cpp.o
In file included from /opt/assimp2json/assimp/test/unit/Main.cpp:1:0:
/opt/assimp2json/assimp/test/unit/UnitTestPCH.h:11:25: fatal error: gtest/gtest.h: No such file or directory
 #include <gtest/gtest.h>
                         ^
compilation terminated.
assimp/test/CMakeFiles/unit.dir/build.make:77: recipe for target 'assimp/test/CMakeFiles/unit.dir/unit/Main.cpp.o' failed
make[2]: *** [assimp/test/CMakeFiles/unit.dir/unit/Main.cpp.o] Error 1
CMakeFiles/Makefile2:250: recipe for target 'assimp/test/CMakeFiles/unit.dir/all' failed
make[1]: *** [assimp/test/CMakeFiles/unit.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

“。

其他人有能力构建这个并愿意分享这个技巧吗?或者其他人没有做到,我应该看看其他软件吗?如果能得到帮助,我们将不胜感激。

EN

回答 1

Stack Overflow用户

发布于 2016-07-01 22:57:54

assimp2json :使用正确的命令在这里构建OK ...100%构建目标assimp2json

代码语言:javascript
复制
git clone https://github.com/assimp/assimp2json.git
cd assimp2json/
git submodule init
git submodule update
mkdir build
cd build/
cmake ../
make

也就是说,大多数"cmake build“都需要一个build/文件夹。还有:可能你对三年前的代码使用了一个太晚的g++。建议:CXX=g++-4.9 cmake ../ ...还有什么问题吗?然后请使用您的操作系统名称和版本更新您的帖子。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38146949

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档