"multiple definition" error when linking to boost::process 0.6
<p>I am a bit lost with this linking error, I assume the problem lies on my side rather than in the lib itself but I don't know how to solve this.</p>

<p>I am trying to link to boost::process 0.6 <a href="https://github.com/klemens-morgenstern/boost-process/" rel="nofollow">https://github.com/klemens-morgenstern/boost-process/</a> </p>

<p><strong>main.cpp</strong></p>

<pre><code>#include &lt;boost/log/trivial.hpp&gt;
#include &lt;boost/log/common.hpp&gt;
#include &lt;boost/log/sinks.hpp&gt;
#include &lt;boost/log/sources/logger.hpp&gt;
#include &lt;boost/shared_ptr.hpp&gt;

#include &lt;iostream&gt;
#include &lt;thread&gt;

#include "ui.h"
#include "queue.h"
#include "image_processor.h"
#include "recorder.h"

using namespace boost::log;

int main(int argc, char **argv) {

    atomic_bool stop_execution{false};
    shared_ptr&lt;image_queue_blocking&gt; recording_queue  = make_shared&lt;image_queue_blocking&gt;(10);

    /**/
    boost::filesystem::path ffmpeg_path = "/usr/bin/ffmpeg";

    recorder video_recorder;
    bool ret = video_recorder.setup(recording_queue, ffmpeg_path);
    if (ret == false) {
        cout &lt;&lt; "main::recorder setup failed" &lt;&lt; std::endl;
        return 1;
    }

    /**/
    thread recording_thread = thread(&amp;recorder::start, video_recorder, ref(stop_execution));

    /**/
    recording_thread.join();

    return 0;
}
</code></pre>

<p><strong>recorder.cpp</strong></p>

<pre><code>#include "recorder.h"

recorder::recorder() {
    io_service = std::make_shared&lt;boost::asio::io_service&gt;();
    stdin_pipe = std::make_shared&lt;boost::process::async_pipe&gt;(*io_service);
}

recorder::~recorder() {}

bool recorder::start_process() {
    /*
    */
}

bool recorder::setup(shared_ptr&lt;image_queue_blocking&gt; recording_queue, boost::filesystem::path &amp; ffmpeg_path) {
    /*
    */
    return true;
}

bool recorder::start(atomic_bool &amp; stop_execution) {
    /*
    */
}
</code></pre>

<p><strong>recorder.h</strong></p>

<pre><code>#ifndef THREEBEE_RECORDER_H
#define THREEBEE_RECORDER_H

#ifndef RECORDER_H
#define RECORDER_H

#include &lt;thread&gt;
#include &lt;exception&gt;
#include &lt;memory&gt;
#include &lt;vector&gt;
#include &lt;string&gt;
#include &lt;iostream&gt;
#include &lt;boost/assign.hpp&gt;
#include &lt;boost/filesystem.hpp&gt;
#include &lt;boost/iostreams/stream.hpp&gt;

#include &lt;boost/process.hpp&gt;
#include "queue.h"


class recorder {
public:
    recorder();
    ~recorder();
    bool setup(shared_ptr&lt;image_queue_blocking&gt; recording_queue, boost::filesystem::path &amp; ffmpeg_path);
    bool start(atomic_bool &amp; stop_execution);
    bool start_process();

private:
    std::shared_ptr&lt;boost::asio::io_service&gt; io_service;
    std::shared_ptr&lt;boost::process::async_pipe&gt; stdin_pipe;
    boost::filesystem::path ffmpeg_path_;
    shared_ptr&lt;Mat&gt; image;
    shared_ptr&lt;image_queue_blocking&gt; recording_queue_;
};


#endif //THREEBEE_RECORDER_H
#endif //RECORDER_H
</code></pre>

<pre class="lang-none prettyprint-override"><code>CMakeFiles/main.dir/recorder.cpp.o: In function `boost::process::detail::posix::cmd_setter_::make_cmd(std::vector&lt;std::string, std::allocator&lt;std::string&gt; &gt;&amp;)':

recorder.cpp:(.text+0x11c): multiple definition of `boost::process::detail::posix::cmd_setter_::make_cmd(std::vector&lt;std::string, std::allocator&lt;std::string&gt; &gt;&amp;)'

CMakeFiles/main.dir/main.cpp.o:main.cpp:(.text+0x142): first defined here

CMakeFiles/main.dir/recorder.cpp.o: In function `boost::process::detail::posix::exe_cmd_init::make_cmd()':

recorder.cpp:(.text+0x1fc): multiple definition of `boost::process::detail::posix::exe_cmd_init::make_cmd()'

CMakeFiles/main.dir/main.cpp.o:main.cpp:(.text+0x222): first defined here

CMakeFiles/main.dir/recorder.cpp.o: In function `boost::process::detail::posix::async_pipe::operator=(boost::process::detail::posix::async_pipe&amp;&amp;)':

recorder.cpp:(.text+0x316): multiple definition of `boost::process::detail::posix::async_pipe::operator=(boost::process::detail::posix::async_pipe&amp;&amp;)'

CMakeFiles/main.dir/main.cpp.o:main.cpp:(.text+0x33c): first defined here
</code></pre>