ChemiCalChems
ChemiCalChems

Reputation: 643

QApplication constructor segfault

Earlier in the day, every thing worked nice as hell, suddenly it all broke.

#include <QtGui/QApplication>

int main(int argc, char** argv) {
    QApplication app {argc, argv};
}

Compile with g++ main.cpp -lQtCore -lQtGui -I/usr/include/qt4, gives me a segfault, and I have no clue why.

I have made some investigation on the matter, and it seems that something may be wrong with either argc or argv, but earlier in the day this didn't happen at all.

Upvotes: 0

Views: 341

Answers (1)

ChemiCalChems
ChemiCalChems

Reputation: 643

Upgrading to Qt5 from Qt4 solved the problem.

Upvotes: 1

Related Questions