Fixed Eigen memory alignment assertions in cmodview with g++/Windows.

sensor-dev
Chris Laurel 2010-02-06 04:00:12 +00:00
parent c0b425c143
commit 626e24d9f9
2 changed files with 10 additions and 0 deletions

View File

@ -59,3 +59,11 @@ macx {
QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.5.sdk
CONFIG += x86 ppc
}
win32-g++ {
# Workaround for g++ / Windows bug where requested stack
# alignment is ignored. Without this, using fixed-size
# vectorizable Eigen structures (like Vector4f) will cause
# alignment assertions.
QMAKE_CXXFLAGS += -mincoming-stack-boundary=2
}

View File

@ -23,6 +23,8 @@ class ModelViewWidget : public QGLWidget
{
Q_OBJECT
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
ModelViewWidget(QWidget *parent);
~ModelViewWidget();