views:

92

answers:

2

I have compiled my iPhone app with setting (Device, Release).

I install it on the test machine and it runs with no problem.

Here's the problem. The app is linked to a C++ library. The compilation on the simulator has no errors. However the device compilation produces 568 errors, mostly about different visibilities w.r.t AppDelegate.o.

They all look like:

QL::Error::~Error()has different visibility (default) in /QL/build/Release-iphoneos/libQLLibrary.a(abcd.o) and (hidden) in /Programming/ObjC/Second/build/Second.build/Release-iphoneos/FG.build/Objects-normal/armv6/AppDelegate.o

Why is this, and how can I stop the errors anyway?

A: 

You can force visibility with: -fvisibility=hidden

Saul Rennison
Done that. no errors in the simulator edition, but Device edition won't take it.
John Smith
A: 

I finally found the answer. XCode treats ld warnings as errors.

John Smith