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


Hi Divya,

> pasting "version" and "." does not give a valid preprocessing token.

That is correct. "version." is not a valid preprocessing token.  It is two tokens, "version" and ".".  Preprocessor pasting REQUIRES that the resulting token is a single valid token.

In the case you are working with, you probably want this, which relies on string literal concatenation:

#define NAME_STRING "lib" stringify(TARGET) ".so"

HTH,
--Eljay


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