Information Technology, Thank You Sir May I Have Another

MOC Parse error at “std”

You’re being a good little geek. You need to write a Qt program for both 32-bit and 64-bit platforms so you are using multiple VMs and keeping the repository on a shared drive. Everything compiles clean and runs great on the 32-bit VM. You boot the 64-bit VM, mount the shared drive and bam!

usr/include/c++/7/bits/stl_relops.:67: Parse error at "std"

Sucks to be you!

Searching the Web leads you to bug reports like this one. Good luck with that rabbit hole! More poking around leads to various things.

developer@developer-U18-04-64-bit-dev-VirtualBox:/mnt/share/git_repo/ipos$ ls /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h

You try hand installing QtCreator and re-starting the 64-bit VM which thankfully doesn’t solve the problem, because if it did you would _really_ be lost. In desperation you add the following to your .pro file knowing it is a hack you will need to trap on the 32-bit side.

INCLUDEPATH += /usr/include/x86_64-linux-gnu/c++/7/bits

No luck! And Web searches are of no use. How could this go so sideways?

Well my little geek, you got screwed with your pants on from afar. Some misguided powers that be high up in the Qt world decided to add a file to the Qt compile process and basically said nothing about it.

-rwxrwxrwx 1 root root 739 Oct 26 15:01 .qmake.stash

That hidden file needs to be blasted each time you build if you use a shared drive or someone accidentally added it to your source repo. It is automatically generated and stashes library paths. If you are using a shared drive to build and test your repo for multiple targets, the first step in your build process must be to nuke it. Then you will never see this error, your build will just take a touch longer.

For more insight about the art of software development read my new book “The Minimum You Need to Know About the Phallus of AGILE