Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How could I link a linux .so shared library in Mac os?

I have third party who gives to me .so file which is already compiled shared library.

Just Like:

file securitymduserapi.so 
securitymduserapi.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped

but when I try to use otool to show more info, I got this error:

otool -L securitymduserapi.so 
securitymduserapi.so: is not an object file

It's that possible to link linux compile .so shared library in macos.

Mac os version: 10.10.3

I'm still wondering about the linux architecture with the mac, If I create a shared library in linux, Can I try to use this shared library in mac os?

like image 225
nooper Avatar asked Nov 20 '25 06:11

nooper


1 Answers

If I create a shared library in linux, Can I try to use this shared library in mac os?

You can try, but you can't succeed.

You wouldn't expect to be able to use Windows .DLL on MacOS, would you? A Linux .so is no different in this context.

like image 98
Employed Russian Avatar answered Nov 21 '25 20:11

Employed Russian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!