Change gcc compiler error text

At my company, we recently did some complicated things with C ++ and templates using some compiler functions. When working with this code, people need to follow several configuration steps, otherwise they will get some rather critical compiler errors, what I would like to do is to determine if there is a way to tell the compiler to enter or change the message published for compilation error ? so I either get a friendly message that instructs the person in combination with a cryptic error or instead of a cryptic error.

Thank.

+3
source share
4 answers

, . -, , ; , . , , - .

+4
+2
gcc source.c 2>&1 | sed -e 's/Cryptic Message/Friendly Message/'

. , - .

+1

script? script STDOUT/STDERR .

0

Source: https://habr.com/ru/post/1744024/


All Articles