【发布时间】:2018-08-09 12:04:16
【问题描述】:
在我为portmidi配置了cmake文件,并继续使用make制作必要的文件后,我在编译过程中遇到了这个错误:
- Build files have been written to: /home/mycomputername
/Desktop/portmedia/portmidi
[ 2%] Linking C shared library /Release/libpmjni.so
/usr/bin/x86_64-linux-gnu-ld: cannot open output file /Release/libpmjni.so: No such file or directory
collect2: error: ld returned 1 exit status
pm_common/CMakeFiles/pmjni.dir/build.make:251: recipe for target '/Release/libpmjni.so' failed
make[2]: *** [/Release/libpmjni.so] Error 1
CMakeFiles/Makefile2:87: recipe for target 'pm_common/CMakeFiles/pmjni.dir/all' failed
make[1]: *** [pm_common/CMakeFiles/pmjni.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
我很困惑。我试图在 ccmake 的 cxx-flags 部分插入标志 -fpic 并更改默认的 java 安装路径无济于事。坦白说,我觉得跟执行顺序搞乱有关,但我不知道在哪里。
任何帮助将不胜感激。
【问题讨论】:
-
Release 目录是否退出?我猜您正在为某些根目录使用未初始化的宏...
-
/Release/libpmjni.so 在您的系统中的位置是什么。
-
我的系统中没有 Release/libpmjni.so。据我所知,只有 pmjni.c 代码。
-
好吧。这段代码不是我写的。老实说,不知道发生了什么,更不用说找到未初始化的宏了。我也从未在安装包中获得 cmake 的 cmakelists.txt 文件。我应该只是查看源代码...虽然我对 c 不是很熟悉...