我们有 SPARC 项目可以通过静态链接移植到 x86。 链接器中 CC 编译器的最后一步失败:
ld:致命:库 -lcryptoki:未找到 ld:致命:库-lrt:未找到 ld:致命:库-lsocket:未找到 等等
库的路径是: /usr/本地/库 /选择/csw/lib
这些库到哪里去了? 谢谢!
最佳答案
Solaris 10 删除了系统静态库。您必须动态链接 Solaris 10(及更高版本)可执行文件。
Features Removed from the Solaris 10 Operating System
Solaris Static System Libraries
This announcement applies only to 32-bit static-system libraries and statically linked utilities. Sixty-four-bit static system libraries and utilities have never been provided.
Support for 32-bit Solaris static-system libraries and statically linked utilities is no longer provided in Solaris. Of particular note, support for the static C library (/usr/lib/libc.a) is no longer provided in Solaris.
Applications that are linked with existing static system libraries might not work correctly in Solaris. Only applications that are dynamically linked with the system libraries that provide the Solaris application binary interface (ABI) are designed for future compatibility.
Applications that directly depend on the behavior of system traps might not work correctly in Solaris. Applications that link with non-Sun libraries that directly depend on the behavior of system traps, typically libraries that provide substitute ABI functions, might not work correctly in Solaris.
关于c++ - Solaris 5.10 x86 CC 链接器错误 : ld: fatal: library -lcryptoki: not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36577804/