Occasionally, you want to debug (with delve) your project, but when you attempt to do so, you are greeted with the following error:
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^~~~~~~
cc1: all warnings being treated as errors
To resolve this, just export CGO_CFLAGS
with the value "-O2 -g -Wno-error"
.
Top comments (0)