Im trying to pass my git commit hash into my C program but im keep getting errors.
this is part of my makefile:
GIT_COMMIT := $(shell git rev-parse --verify HEAD)
Defines += -DGIT_COMMIT=\"$(GIT_COMMIT)\"\
and then I'm passing "Defines" to icc compiler.
in my C code , the following line causes error - "error: extra text after expected end of number"
printf("GIT COMMIT HASH: %s", GIT_COMMIT);
any idea what I'm doing wrong here?