Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>The solution found:</strong></p> <p>I downloaded eclipse kepler <a href="http://www.eclipse.org/downloads/index-developer.php" rel="nofollow noreferrer">Kepler</a></p> <p>Created a new project and tried to compile this source code (like above):</p> <pre><code>#include &lt;iostream&gt; #include &lt;vector&gt; #include &lt;thread&gt; using namespace std; class TestClass { public: void test() { cout &lt;&lt; "test" &lt;&lt; endl; } }; void test() { vector&lt;TestClass&gt; testClassVector; TestClass x; testClassVector.push_back(x); testClassVector.begin()-&gt;test(); } int main() { thread(test).join(); return 0; } </code></pre> <p>On the first run eclipse told me, thread belongs to the new c++11 standard and I have to add <strong>-std=c++11</strong> to the compiler flags. To use thread I also added <strong>-pthread</strong> to the linker flags. With this steps the code could be compiled, but eclipse marks the thread still as unknown. To fix this I proceeded the following step:</p> <p><em>Under C/C++ Build (at project settings), find the Preprocessor Include Path and go to the Providers Tab. Deselect all except CDT GCC Builtin Compiler Settings. Then untag Share settings entries … . Add the option -std=c++11 to the text box called Command to get compiler specs.</em></p> <p>Found <a href="https://stackoverflow.com/questions/9131763/eclipse-cdt-c11-c0x-support">here</a>.</p> <p>Now - unbelievable but true - it works, even without any errors marked by eclipse. The solution is using the (beta) version of eclipse, wich seems to handle this in a better way.</p> <p>Thanks for all your help! </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload