pasting x amd x does not give a valid preprocessing token

John (Eljay) Love-Jensen eljay@adobe.com
Fri Jan 12 11:59:00 GMT 2007


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



More information about the Gcc-help mailing list