[aspectc-user] LNK2005 with woven Codes
Olaf Spinczyk
Olaf.Spinczyk at informatik.uni-erlangen.de
Sun Oct 22 08:20:11 CEST 2006
Hello Yan,
it looks as if you defined the member functions of "Profiling" as
non-inline functions in the aspect header file. If the aspect affects
more than one translation unit, the code will be generated more than
once and the linker complains. Better define the small functions as
inline functions.
Best regards,
Olaf
Yan Mao wrote:
> Hello,
>
> I got LNK2005 errors by linking the woven codes.
> it seems to me, that the same aspect is expanded in multiple cpp files.
>
> I have #ifndef #define and #endif macros in every head file, and I also notice that AC++ compiler generate constant names such as
> __ac_have_C__DA_ACSTUTest_aspects_Profiling_ah__
> __ac_need_C__DA_ACSTUTest_aspects_Profiling_ah__
>
> But they still dont work. What's wrong with my codes?
>
> I'd like to post the sample codes, hope anyone can help me!
>
> thanks in advance!!
>
> Yan
>
More information about the aspectc-user
mailing list