This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: pasting x amd x does not give a valid preprocessing token
- From: "John \(Eljay\) Love-Jensen" <eljay at adobe dot com>
- To: "Divya Shresth" <divya_shresth at yahoo dot com>, <gcc-help at gcc dot gnu dot org>
- Date: Fri, 12 Jan 2007 03:54:10 -0800
- Subject: RE: pasting x amd x does not give a valid preprocessing token
- References: <8296218.post@talk.nabble.com>
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