开发者

Mac OS X libcurl dylib compatibility version

开发者 https://www.devze.com 2023-03-13 02:24 出处:网络
My application builds and runs fine on 10.6. I have Base SDK set to 10.6 and Mac OS X Deployment Target set to 10.5.

My application builds and runs fine on 10.6. I have Base SDK set to 10.6 and Mac OS X Deployment Target set to 10.5.

My application uses the system libcurl.dylib — instead of adding the dylib to the project, I just add -lcurl to the linker flags in build settings. (Though I have tried it both ways.)

When I launch the application on 10.5.8, I get the following error

Dyld Error Message: Library not loaded: /usr/lib/libcurl.4.dylib

Referenced from: /Applications/My Application.app/Contents/MacOS/MyApplication

Reason: Incompatible library version:

MyApplication requires version 6.0.0 or later, but libcurl.4.dylib provides version 5.0.0

Sure enough, if I otool -L the application's binary, I get the following for libcurl:

/usr/lib/libcurl.4.dylib (compatibility version 6.0.0, current version 6.1.0)

Is there an开发者_如何学Pythony way around this, or should I just statically link my own libcurl build?


Have you tried setting the Base SDK to 10.5 as well?

$ otool -L /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libcurl.4.dylib
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/libcurl.4.dylib:
    /usr/lib/libcurl.4.dylib (compatibility version 6.0.0, current version 6.1.0)
    ...]
$ otool -L /Developer/SDKs/MacOSX10.5.sdk/usr/lib/libcurl.4.dylib
/Developer/SDKs/MacOSX10.5.sdk/usr/lib/libcurl.4.dylib:
    /usr/lib/libcurl.4.dylib (compatibility version 5.0.0, current version 5.0.0)
    [...]
0

精彩评论

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