From: Michael T. <li...@mj...> - 2003-06-26 04:00:14
|
Hi, Is there some kind of hidden setting in the project file to turn off newer compiler features? I started adding the variadic macro stuff, but it isn't letting me use the new feature where ,## lets you have zero arguments for the format string. So this: log4Debug(@"Set Log Level to Debug for Log message test."); is telling me that I'm missing an argument, with log4Debug defined as: #define log4Debug(message, args...) // etc. It doesn't like other newer GCC features like the ?: operator, which I used in this code from L4SimpleLayout that I was speeding up: - (NSString *) format: (L4LoggingEvent *) anEvent { return [NSString stringWithFormat:@"%@ - %ld %@:%@) %@ - %@", [[anEvent level] stringValue], [anEvent millisSinceStart], // [anEvent fileName] ?: @"", [anEvent fileName] ? [anEvent fileName] : @"", // [[anEvent lineNumber] stringValue] ?: @"", [anEvent lineNumber] ? [[anEvent lineNumber] stringValue]: @"", // [anEvent methodName] ?: @""; [anEvent methodName] ? [anEvent methodName] : @"", [anEvent renderedMessage]]; } When I added the same files to one of my other projects, they compiled fine. As far as I can tell, the settings in Project Builder that would matter are the same, but I must be missing something. --Michael |
From: bob f. <chi...@ma...> - 2003-07-02 16:07:45
|
Hi, Sorry I didn't get back to you sooner. Did you solve this? I'm totally swamped catching up from last week. If you're still having problems, I'll have some time to help you out later next week. Please keep me posted on any progress you make along these lines. Thanks, Bob On Wednesday, June 25, 2003, at 11:00 PM, Michael Tsai wrote: > Hi, > > Is there some kind of hidden setting in the project file to turn off > newer compiler features? I started adding the variadic macro stuff, > but it isn't letting me use the new feature where ,## lets you have > zero arguments for the format string. So this: > > log4Debug(@"Set Log Level to Debug for Log message test."); > > is telling me that I'm missing an argument, with log4Debug defined as: > > #define log4Debug(message, args...) // etc. > > It doesn't like other newer GCC features like the ?: operator, which I > used in this code from L4SimpleLayout that I was speeding up: > > - (NSString *) format: (L4LoggingEvent *) anEvent > { > return [NSString stringWithFormat:@"%@ - %ld %@:%@) %@ - %@", > [[anEvent level] stringValue], > [anEvent millisSinceStart], > // [anEvent fileName] ?: @"", > [anEvent fileName] ? [anEvent fileName] : @"", > // [[anEvent lineNumber] stringValue] ?: @"", > [anEvent lineNumber] ? [[anEvent lineNumber] stringValue]: @"", > // [anEvent methodName] ?: @""; > [anEvent methodName] ? [anEvent methodName] : @"", > [anEvent renderedMessage]]; > } > > When I added the same files to one of my other projects, they compiled > fine. As far as I can tell, the settings in Project Builder that would > matter are the same, but I must be missing something. > > --Michael > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: INetU > Attention Web Developers & Consultants: Become An INetU Hosting > Partner. > Refer Dedicated Servers. We Manage Them. You Get 10% Monthly > Commission! > INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php > _______________________________________________ > Log4cocoa-development mailing list > Log...@li... > https://lists.sourceforge.net/lists/listinfo/log4cocoa-development > --- Bob Frank bo...@ap... (312) 902 - 7393 |
From: Michael T. <li...@mj...> - 2003-07-02 19:34:06
|
On Wednesday, July 2, 2003, at 12:07 PM, bob frank wrote: > Did you solve this? No. I tried building the project on a machine that still had the old dev tools (GCC 3.1), but that didn't help. I don't know what's left to try aside from recreating the project from scratch. -- Michael Tsai <http://www.c-command.com> |
From: Michael T. <li...@mj...> - 2003-07-06 00:39:00
|
On Thursday, June 26, 2003, at 12:00 AM, Michael Tsai wrote: > Is there some kind of hidden setting in the project file to turn off > newer compiler features? I started adding the variadic macro stuff, > but it isn't letting me use the new feature where ,## lets you have > zero arguments for the format string. I still don't know what was wrong, but it's at least working now (letting me use the newer compiler features). What I did was set CC in the expert settings to /usr/bin/gcc-3.3. This shouldn't make a difference, because /usr/bin/gcc is 3.1, which does support the features. And I've never needed to set manually set CC in my other projects. But for now I'm just glad that it works. :) -- Michael Tsai <http://www.c-command.com> |
From: Bob F. <chi...@ma...> - 2004-03-17 03:32:06
|
Hi All, I just wanted to welcome Michael James as a new developer on Log4Cocoa. He is planning on adding additional support for Pattern Layouts. Welcome and happy coding. -Bob |