I am not completely clear on the intent, it sounds like some preprocessor capability:
http://gcc.gnu.org/onlinedocs/cpp/Stringification.html#Stringification
From that example you find this terse explanation that seems to be what you want.
#define xstr(s) str(s)
#define str(s) #s
#define foo 4
str (foo)
==> "foo"
xstr (foo)
==> xstr (4)
==> str (4)
==> "4"
So you would be able to do something like this:
#define xstr(s) str(s)
#define str(s) #s
#define num 7
#pragma comment(lib, "string" xstr(num))
Normal string merging rules should make that all fine if it were in actual code, but I am not sure if the string will automatically merge in the pragma. That is probably implementation dependent.