如何获得编译器警告JUCE - Ubuntu [英] How to get compiler warnings JUCE - Ubuntu

查看:265
本文介绍了如何获得编译器警告JUCE - Ubuntu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在处理


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.

解决方案

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.

这篇关于如何获得编译器警告JUCE - Ubuntu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆