viktorgino / headunit-desktop

HeadUnit Desktop is a car PC software built with Qt 5 and QML
https://github.com/viktorgino/headunit-desktop/wiki
GNU General Public License v3.0
284 stars 64 forks source link

Cannot compile project - error: incomplete type ‘std::atomic<bool>‘ #1

Closed suhrmann closed 7 years ago

suhrmann commented 7 years ago

Hello. I'd really like to give this promising project a try, but I can't build it.

I'm following the guidelines on HeadUnit Desktop

There you say at "Build headunit":

Clone this repo

Here I get the first error error: unknown switch `j' trying to use

git clone --recursive --depth 1 -j6 https://github.com/viktorgino/headunit-desktop.git && cd headunit-desktop

I solved this by simply removing the -j6 from git clone-command

And compile headunit-dekstop

When I try to compile the project, using the command qmake && make -j4 sub-app-pro it fails, giving me these errors (twice): I copied the whole log to pastebin

In file included from headunit.cpp:1:0:
headunit.h:40:23: error: field ‘connected’ has incomplete type ‘std::atomic<bool>’
     std::atomic<bool> connected;
                       ^
In file included from /usr/include/c++/5/bits/shared_ptr_atomic.h:33:0,
                 from /usr/include/c++/5/memory:83,
                 from /usr/include/c++/5/thread:40,
                 from headunit/hu/hu_aap.h:6,
                 from headunit.h:15,
                 from headunit.cpp:1:
/usr/include/c++/5/bits/atomic_base.h:126:12: note: declaration of ‘struct std::atomic<bool>’
     struct atomic;
            ^
In file included from headunit.cpp:1:0:
headunit.h:41:23: error: field ‘videoFocus’ has incomplete type ‘std::atomic<bool>’
     std::atomic<bool> videoFocus;
                       ^
In file included from /usr/include/c++/5/bits/shared_ptr_atomic.h:33:0,
                 from /usr/include/c++/5/memory:83,
                 from /usr/include/c++/5/thread:40,
                 from headunit/hu/hu_aap.h:6,
                 from headunit.h:15,
                 from headunit.cpp:1:
/usr/include/c++/5/bits/atomic_base.h:126:12: note: declaration of ‘struct std::atomic<bool>’
     struct atomic;
            ^
In file included from headunit.cpp:1:0:
headunit.h:42:23: error: field ‘audioFocus’ has incomplete type ‘std::atomic<bool>’
     std::atomic<bool> audioFocus;
                       ^
In file included from /usr/include/c++/5/bits/shared_ptr_atomic.h:33:0,
                 from /usr/include/c++/5/memory:83,
                 from /usr/include/c++/5/thread:40,
                 from headunit/hu/hu_aap.h:6,
                 from headunit.h:15,
                 from headunit.cpp:1:
/usr/include/c++/5/bits/atomic_base.h:126:12: note: declaration of ‘struct std::atomic<bool>’
     struct atomic;
            ^

I'm using Ubuntu 16.04 LTS 64 Bit (in an VM) and GNU Make 4.1 built for x86_64-pc-linux-gnu and the chapters Install Qt, Install the prerequisites for building and running headunit and Build and install QtGstreamer worked without problems.

viktorgino commented 7 years ago

Thank you, I've now merged your commit. Let me know if you get stuck again.