I have Qt 5.6.2 installed on Ubuntu 16.04 (64-bit). My project build is successful except for my compiler (GCC 5.4) giving me this error over and over again:
fatal error: No such file or directory
... #include "some_cpp_file.moc"
The file exists in the output directory by the time this error is thrown, and Qt5 moc's the files with no error. It is interesting to note that this error only happens with the source .cpp files I am moc'ing. When I explicitly specify the output directory in the build script (Jamroot), the build is successful - however, this is impractical for the amount of projects that I need to build.
This project built successfully on Ubuntu 14.04 with Qt 4.8. I have installed Qt5 from the .run file they provide and also built the binaries from scratch, but no luck. The build system I am using is Boost.Build (b2) which I also use on Ubuntu 14.04 with Qt4.8 with no issues, a.k.a. I use the Jamroot file to control the build and not a CMake or qmake file.
How can I make the gcc compiler look in the output directory (bin/gcc-5.4/release/...) without explicitly telling it to look there? Is there some flag I need to add?
Thank you very much for your help in advance. :-)
Note: I realize that there aren't many details about the build system or anything, but I can't share many details - I am okay with any general advice or direction if you feel this question is not detailed enough for you to solve completely!