我正在使用
我将这些标志用于compilng
WXWIDGETSFLAGS=`wx-config --gl-libs --cxxflags --libs std stc propgrid richtext`
警告:
g++ `wx-config --gl-libs --cxxflags --libs std stc propgrid richtext` -std=c++11 -Wall -Iinclude source/wxwidget/GUIMemLayMgr.h source/wxwidget/gui.h source/wxwidget/GUIMemLayMgr.cpp source/wxwidget/gui.cpp source/wxwidget/main.cpp -o output/wxwidget
In file included from /usr/include/wx-3.0/wx/propgrid/propgrid.h:26:0,
from source/wxwidget/gui.h:31,
from source/wxwidget/GUIMemLayMgr.h:9:
/usr/include/wx-3.0/wx/propgrid/property.h: In member function 'void wxPGChoices::Set(const wxArrayString&, const wxArrayInt&)':
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress]
if ( &values )
^
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress]
In file included from /usr/include/wx-3.0/wx/propgrid/propgrid.h:26:0,
from source/wxwidget/gui.h:31:
/usr/include/wx-3.0/wx/propgrid/property.h: In member function 'void wxPGChoices::Set(const wxArrayString&, const wxArrayInt&)':
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress]
if ( &values )
^
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress]
In file included from /usr/include/wx-3.0/wx/propgrid/propgrid.h:26:0,
from source/wxwidget/gui.h:31,
from source/wxwidget/GUIMemLayMgr.h:9,
from source/wxwidget/GUIMemLayMgr.cpp:1:
/usr/include/wx-3.0/wx/propgrid/property.h: In member function 'void wxPGChoices::Set(const wxArrayString&, const wxArrayInt&)':
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress]
if ( &values )
^
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress]
In file included from /usr/include/wx-3.0/wx/propgrid/propgrid.h:26:0,
from source/wxwidget/gui.h:31,
from source/wxwidget/gui.cpp:8:
/usr/include/wx-3.0/wx/propgrid/property.h: In member function 'void wxPGChoices::Set(const wxArrayString&, const wxArrayInt&)':
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress]
if ( &values )
^
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress]
In file included from /usr/include/wx-3.0/wx/propgrid/propgrid.h:26:0,
from source/wxwidget/gui.h:31,
from source/wxwidget/main.cpp:22:
/usr/include/wx-3.0/wx/propgrid/property.h: In member function 'void wxPGChoices::Set(const wxArrayString&, const wxArrayInt&)':
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress]
if ( &values )
^
/usr/include/wx-3.0/wx/propgrid/property.h:1049:22: warning: the compiler can assume that the address of 'values' will always evaluate to 'true' [-Waddress]
答案 0 :(得分:3)
这已在Optimize wxPGChoices::Set method提交中修复,该提交在3.0.2
之后。要使用它,您需要从git或3.0
版本获取最新的3.1.0
分支 - 基本上是在提交之后的任何内容。
答案 1 :(得分:0)
我改变了
中的包含#include <wx/propgrid/propgrid.h>
到
#include <wx-3.0/wx/propgrid/propgrid.h>
现在工作正常。