开发者

Link errors on Snow Leopard

开发者 https://www.devze.com 2022-12-11 04:08 出处:网络
I creating a small desktop application using Qt and Poco on Mac OS X Snow Leopard. Qt works fine, but once I started linking with Poco I get the following warning:

I creating a small desktop application using Qt and Poco on Mac OS X Snow Leopard.

Qt works fine, but once I started linking with Poco I get the following warning:

ld: warning: in /Developer/SDKs/MacOSX10.6.sdk/usr/local/lib/libPocoFoundation.8.dylib, file is not of required architecture

Also whe开发者_StackOverflow社区n I link against the 10.5 SDK:

ld: warning: in /Developer/SDKs/MacOSX10.5.sdk/usr/local/lib/libPocoFoundation.8.dylib, file is not of required architecture

Any hints on how to solve this?

Solved!

Here's my workaround (I also posted it on the Poco forums btw):

The problem is that when the architecture is not specified Snow Leopard defaults to 64-bit, while older versions of the OS default to 32-bit. In the Poco build system, the Darwin config file does not specify the architecture, so it picks 32 bit. My solution was to copy the Darwin_x86_64 config file over the Darwin file and replace the textual instances of 'x86_64' with 'i386'. This forces a 32 bit build.

A somewhat hackish solution though, let me know if it can be done in a cleaner way...


Did you pull down the libraries from somewhere? Poco comes with all the source. Recompile it.

0

精彩评论

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

关注公众号