开发者

For Mac, the library extension name can be anything?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜