views:

73

answers:

1

Hi,

I am using plugins for one of my Mac OS X(desktop) application. These plugins refer to a common file that contains base class implementation of both the plugins.

When the application refers to this common base class, the following message is displayed in the console by the system:

" is implemented in both and . One of the two will be used. Which one is undefined."

This console message is displayed from 10.5.x onwards.

However this does not cause any problem. But, I do not want my class name to be printed in the console. Can someone help to avoid this console message.

+1  A: 

A possible way around is to #define the name of your class as something unrelated, so that it remains the same in your code, for your use, but is obfuscated in the executable.

I'd like a neater solution myself. I have searched quite a lot, and it seems that in general console messages are for solving problems, rather than for looking for them, and more specifically that this kind of message isn't really an issue.

One can also use an EXPORTED_SYMBOLS_FILE or an UNEXPORTED_SYMBOLS_FILE (these are the relevant build setting names) to state which symbols you do or don't want to export. Often, you want to export at least one, but it can reduce the number of names that are revealed.

Rob Crossleigh