I'm not sure I recommend it, but ...
The title may include:
#define LIB_VERSION_SUFFIX _3_17
#define LIB_PASTER(x, y) x ## y
#define LIB_EVALUATOR(x, y) LIB_PASTER(x, y)
#define LIB_FUNCTION(x) LIB_EVALUATOR(x, LIB_VERSION_SUFFIX)
#define lib_functionA LIB_FUNCTION(lib_functionA)
extern int lib_functionA(const char *, int);
Etc.
The code user writes in terms of undecorated function names (lib_functionA), while the header ensures that the correct version suffix is added.
You do not have to change each function; you need to make sure that some function that will always be used will be decorated with the version number. If there is an initialization function ( lib_init()maybe), use it. You can do this with a variable; the hard part then ensures that the variable is specified in each program.
Note that it is more common to ensure that the library interface does not change across versions, so that programs can be linked to any version without compilation.