问题
I was recently dealing with an error that should have easily been realized with a simple compiler warning.
Does anyone know how to get compiler warnings to show up when compiling JUCE projects with make
on Ubuntu?
I attempted:
make -Wall
from the gcc/gnu Warning Options docs -> no changemake V=1
as commented in the makefile -> it was verbose, but didn't show the warnings- Editing the live build settings in the Projucer -> live build doesn't work on Ubuntu
Edit: Answered by OMGtechy
To add compiler warnings to the build: edit the Linux Makefile settings in the Exporter tab of the Projucer File Manager (See the picture in his answer). However, I didn't see any "uninitialized variable" warnings until I also ran with the optimization flag -O2
. Apparently gcc is bad with that warning.
回答1:
You want to add -Wall
to your exporter compiler flags, possibly with -Werror
too. Just adding them to the live build flags will only affect the Projucer's live build feature.
来源:https://stackoverflow.com/questions/45891062/how-to-get-compiler-warnings-juce-ubuntu