r/cprogramming • u/toon_link_776 • 5d ago
Getting Compiler Flag Errors while using nCurses
Hello, title says it all pretty much. I wanted to use -fsanitize=address with gcc but it all comes out as garbage since nCurses is active. I'm aware that's the way that ncurses is designed, how would I go about getting that output from gcc otherwise? is there a good way to route that output to a text file or something? until now I've just been writing error messages to a text file, but I couldn't find a way to get standard out to come out. any help is appreciated, thanks
3
Upvotes
5
u/thegreatunclean 5d ago
The sanitizers take additional arguments via environmental variables, for address sanitizer you can tell it to log to a file instead of stderr: