1

我正在为我的 Mac OS X(桌面)应用程序之一使用插件。这些插件引用一个包含两个插件的基类实现的通用文件。

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.

4

1 回答 1

1

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.

于 2010-02-19T13:51:11.343 回答