English 中文(简体)
Link errors on Snow Leopard
原标题:
  • 时间:2009-11-13 16:47:05
  •  标签:
  • c++
  • qt
  • poco

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 when 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.

问题回答

暂无回答




相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签