On 11/13/06, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
Andrew Borley wrote:
> Hi Sebastien,
>
> I'm getting a build failure on windows (VC7) dur to the new-style
> logging stuff you've put in:
> ../../../runtime\core\src\tuscany\sca\util\Logging.h(35) : error
> C2010: '.' : unexpected in macro formal parameter list
>
> I think this is due to the VC7 compiler not supporting variable-arg
> macros - doing a search for the error throws up this post:
> http://www.codeguru.com/forum/showthread.php?t=318438 which states at
> the bottom that "macros with variable arguments are not supported by
> ANSI C++.". There is a suggested workaround that we could use which
> requires the arguments to be parenthesized:
>
> #define FUNC(foo)  ThisFunc foo
>
> void ThisFunc(int, ...);
>
> int main()
> {
>    FUNC((123, 456));
> }
>
> What do you think?
>
> Cheers
> Andrew
>

Andy,

Sorry for breaking the VC7 build... VC++ express 2005 was happy with the
new macros, I didn't imagine it would be different with VC7.

I may have more time to look into it later this evening, but I made a
quick change to the loginfo/logwarning/logerror macros under revision
r474517 to be similar to the Windows Afx TRACE macro. This provides the
same simple usage without  __VA_ARGS or requiring the arguments to be
parenthesized.

This builds OK on Linux, still builds OK on Windows with VC++ express
2005. I think it will work with VC7 but I can't test it as I only have
VC++ express 2005. Would you mind giving it a try?


That builds fine on VC7 now - thanks Sebastien!

Andy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to