开发者

For Mac, the library extension name can be anything?

开发者 https://www.devze.com 2023-02-04 14:54 出处:网络
I\'m testing SWIG on Mac. The default file extension that SWIG on Mac produces is .so file as follows.

I'm testing SWIG on Mac.

The default file extension that SWIG on Mac produces is .so file as follows.

g++ -arch i386 -bundle -undefined suppress -flat_namespace   
    exam开发者_高级运维ple.o example_wrap.o    -o libexample.so

However, I have no problem with -o libexample.dylib in terms of making and running the result.

Why is this? For Mac, the library extension name can be anything?


What matters is the internal Mach-O object file type rather than the file name or extension. See, for instance, the explanation here.

0

精彩评论

暂无评论...
验证码 换一张
取 消