This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pasting x amd x does not give a valid preprocessing token


Divya Shresth writes:
 > 
 > I am trying to build my appliaction then i am getting the following error
 > with gcc 3.3.3
 > 
 > pasting "version" and "." does not give a valid preprocessing token.
 > 
 > The source of this error is the following piece of code
 > 
 > #define paste_tokens(a,b) real_paste_tokens(a,b)
 > #define real_paste_tokens(a,b) a ## b
 > #define stringify(x) real_stringify(x)
 > #define real_stringify(x) #x
 > 
 > #define NAME_STRING stringify(paste_tokens(lib, paste_tokens(TARGET, .so)))
 > 
 > #define LOCAL_VERSION_STRING (char*) NAME_STRING
 > 
 > I just cannt find a way out. I have tried removing ## too as suggested by a
 > few pepole but it still dosnt work.

Can't you do this at runtime instead?  What are you using the
resulting string for?

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]