How to get compiler warnings JUCE - Ubuntu [closed]

感情迁移 提交于 2019-12-12 06:46:22

问题


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 change
  • make 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 -Wallto 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!