I need to have a string that uses a macro value which is an integer. But it’s outside of any functions, so I do not want to create a variable. I’m using it in a #pragma comment.
so something like this:
#define num 7
#pragma comment(lib, "string" + num)
which would combine the string and num making it (#pragma comment(lib, “string7”)
What you want to do is called stringification:
This is inspired by
__stringifymacro ininclude/linux/stringify.hin Linux kernel helpers.