bullet-physics-playground / bpp

The Bullet Physics Playground – Bullet Real-Time Physics Simulation.
https://github.com/bullet-physics-playground
Other
35 stars 6 forks source link

Debian 8 built issue #24

Closed ant-t closed 3 years ago

ant-t commented 7 years ago

src/viewer.cpp: In member function ‘QString Viewer::toPOV() const’: src/viewer.cpp:1277:48: error: ‘class QByteArray’ has no member named ‘toStdString’ QString str = QString::fromStdString(data->toStdString());

After some googling it seems that the Debian qt5-default is configured with -no-stl which limits a lot of the sting tools available.

koppi commented 7 years ago

@ant-t , I was building and running the current bpp code base on Debian/Jessie successfully a while ago , see https://github.com/bullet-physics-playground/bpp/wiki/Build-on-Debian---Jessie – Did you follow these build instructions?

ant-t commented 7 years ago

Yes to the letter, the version of qt5-default is now 5.3.2+dfsg-4+deb8u2, I'm not sure if that's the one you were building against.

The only similar errors I could find were for qt4.8 when it wasn't configured with stl support, it seems that the option has been dropped in qt5. That suggest something is contaminated with qt4 or the version of qt5 currently doesn't support it.

koppi commented 7 years ago

@ant-t I just was able to re-produce the issue you described on a freshly installed Debian 8.7 vm. But I do not yet have an obvious work-around for this. Do you have any ideas for a work-around?

ant-t commented 7 years ago

Unfortunately not. I've tried installing qt-base from source, both the Debian and direct from KDE but both still have the same error. Have you tried building it on a Debian testing machine? I will do it on the weekend and try for the debian mailing lists to see what, if anything, they have there.

ant-t commented 7 years ago

Builds mostly successfully under debian 9.0.

fusuian commented 7 years ago

I also got the same situation in Ubuntu 14.04. QByteArray::toStdString is a member added since Qt 5.4, but Ubuntu's Qt was still 5.2.

The same error comes out in three places, but by correcting all this you can pass compilation.

std::string stddata(data->constData(), data->length());
QString str = QString::fromStdString(stddata);

Thank you.