Windows resource files don't understand the C style literal string concatenation for most elements - string table may be the only exception.
The trick when working with pre-processor macros is then to not use strings as input starting point, the pre-processor doesn't know how to remove quotes.
It would also be helpful to concatenate only once - consider addition of search paths "-I../icons/" rather than adding paths to the resource names.
Pulled the following from boost, example using windows msvc which is using an additional level of indirection than what I have seen in most places.
# define BOOST_PP_CAT(a, b) BOOST_PP_CAT_OO((a, b))
# define BOOST_PP_CAT_OO(par) BOOST_PP_CAT_I ## par
# define BOOST_PP_CAT_I(a, b) a ## b
# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_A((text))
# define BOOST_PP_STRINGIZE_A(arg) BOOST_PP_STRINGIZE_I arg
# define BOOST_PP_STRINGIZE_I(text) #text
In examples seems you could just perform
BOOST_PP_CAT(../icons/, BOOST_PP_CAT(num,.ico))
There is an issue passing to stringize only the outer CAT is applied (On windows at least). So
BOOST_PP_STRINGIZE(BOOST_PP_CAT(../icons/, BOOST_PP_CAT(num,.ico))) doesn't work.
Addition for concatenation of 3 items
# define BOOST_PP_CAT2(a, b, c) BOOST_PP_CAT_OO2((a, b, c))
# define BOOST_PP_CAT_OO2(par) BOOST_PP_CAT_I2 ## par
# define BOOST_PP_CAT_I2(a, b, c) a ## b ## c
In my testing VS2013 an input of
.. is being converted to "..." which makes working with relative path difficult
\ needs to be escaped \\ to work in macro args, but is being converted to "\\" - using / for path works better
Working against the string table can be easier to see output than working with icons
STRINGTABLE
BEGIN
123 BOOST_PP_STRINGIZE(BOOST_PP_CAT(APP_NUMBER, .ico))
124 BOOST_PP_STRINGIZE(BOOST_PP_CAT2(../icons/, APP_NUMBER,.ico)))
END
I haven't yet worked out resolution of .. being converted to ...
I had the following work using the additional search path,
1000 ICON BOOST_PP_STRINGIZE(BOOST_PP_CAT(APP_NUMBER, .ico))
1001 ICON BOOST_PP_STRINGIZE(BOOST_PP_CAT2(icons/, APP_NUMBER, .ico))
.rcfile? I guess it's some kind of resource file, but what kind? What environment are you using?