我正在尝试使用GCC编译程序并使用Qt和SSE内在函数.似乎当我的一个函数被Qt调用时,堆栈对齐不会被保留.这是一个简短的例子来说明我的意思:
#include <cstdio>
#include <emmintrin.h>
#include <QtGui/QApplication.h>
#include <QtGui/QWidget.h>
class Widget: public QWidget {
public:
    void paintEvent(QPaintEvent *) {
        __m128 a;
        printf("a: 0x%08x\n", ((void *) &a));
    }
};
int main(int argc, char** argv)
{
    QApplication application(argc, argv);
    Widget w;
    w.paintEvent(NULL); // Called from here, my function behaves correctly
    w.show();
    w.update();
    // Qt will call Widget::paintEvent and my __m128 will not be
    // aligned on 16 bytes as it should
    application.processEvents();
    return 0;
}
这是输出:
a: 0x0023ff40 // OK, that's aligned …使用 webpack2 动态编译 Angular 应用程序,我devServer这样配置:
proxy: {
    '/api': {
        target: 'http://localhost:52163'
    }
}
代理的目标是 IIS Express 服务器。从 Visual Studio 2012 升级到 2017 后,我现在ECONNREFUSED在尝试访问/api.
我进行了更改http-proxy-middleware以获取有关该错误的更多信息,并注意到它尝试连接到127.0.0.1而不是localhost.
我怎样才能确保http-proxy-middleware连接到localhost?
谢谢