aharren / LibComponentLogging-Core

A small logging library for Objective-C applications (Mac OS X and iPhone OS/iOS) which provides conditional logging based on log levels and log components. Additionally, different logging strategies can be used, e.g. writing log messages to a file or sending them to the system log, while using the same logging interface.
http://0xc0.de/LibComponentLogging
110 stars 11 forks source link

Symbol Visibility Warning when LCL Linked into Static Library #14

Closed blakewatters closed 13 years ago

blakewatters commented 13 years ago

I recently added LCL logging to my RestKit framework (http://github.com/twotoasters/RestKit) and have it linked into a static library. I was getting warnings from the linker about symbol visibility for _lcl_component_level.

I applied the following patch and it seemed to clear things up:

+++ b/Vendor/LibComponentLogging/Core/lcl.h
@@ -221,7 +221,7 @@ uint32_t lcl_configure_by_name(const char *name, _lcl_level_t level);

 // Active log levels, indexed by log component.
-_lcl_level_narrow_t _lcl_component_level[_lcl_component_t_count];
+__attribute__((visibility("default"))) _lcl_level_narrow_t _lcl_component_level[_lcl_component_t_count];
aharren commented 13 years ago

Hi Blake, I will look into this problem and the static library packaging in your project. Best regards, Arne

aharren commented 13 years ago

Hi Blake, I've added the missing extern declaration to the log-level array. The new version is in the master branch, tagged as 1.1.3. RKTwitter from RestKit now compiles without warnings. Best regards, Arne

blakewatters commented 13 years ago

Arne -

Excellent. Will update.

Thanks!

On Thu, Jun 23, 2011 at 5:20 AM, aharren < reply@reply.github.com>wrote:

Hi Blake, I've added the missing extern declaration to the log-level array. The new version is in the master branch, tagged as 1.1.3. RKTwitter from RestKit now compiles without warnings. Best regards, Arne

Reply to this email directly or view it on GitHub:

https://github.com/aharren/LibComponentLogging-Core/issues/14#issuecomment-1424117

Blake Watters Two Toasters | CTO blake@twotoasters.com (919) 926-8537