I want, at build time, to define a string variable in cgo. None of the following approaches works.
-
#cgo CFLAGS: -DLOG="common"
'common' undeclared (first use in this function)
-
#cgo CFLAGS: -DLOG=common
'common' undeclared (first use in this function)
-
#cgo CFLAGS: -DLOG=\"common\"
malformed #cgo argument: -DLOG="common"