我有些怀疑:
用例:
A static library containing a global variable, static variable, a function
and a class defined
A shared library uses these and hence they are part of the same.
A executable program also uses the same and they are part of the same.
The executable loads the shared library
我无法用python加载共享对象库。我尝试将LD_LIBRARY_PATH设置为someObject.o所在的位置,当我使用非sudo命令运行python脚本时,这是可行的,但是当我使用sudo时,会遇到链接错误。
OSError: bbumintflib.o: cannot open shared object file: No such file or directory
有人知道如何将.o文件链接到.so文件吗?
使用ldd,我知道.so找不到.o文件。
>>>ldd someSharedObject.so
linux-vdso.so.1 (0x00007ffca69a
在Mac上,我有一个共享文件夹,~\Documents。有两个子文件夹: Data和Data_2011,前者包含过去几年的文件文件夹,后者包含自2011年1月1日以来更新的数据文件夹中的文件夹的符号链接。这些链接是用标准的ln -s命令创建的。
当我在Windows计算机上挂载共享文档文件夹时,链接会正常工作。当我使用smb在Linux上挂载时,链接就起作用了。当我在主机Mac上直接使用这些链接时,它们可以工作。但是,当我从远程Mac挂载文档文件夹时,软链接就会中断。为了清楚起见,我通过转到Finder > Connect To Server >afp://xxx.xx.x.xx/