Note that there are some explanatory texts on larger screens.

plurals
  1. POclang: warning: -lgtest: 'linker' input unused
    primarykey
    data
    text
    <p>I'm developing applications in C++11 and my compiler is CLang++ 3.3. I'm also using Netbeans 7.3 IDE on Linux Mint 14.</p> <p>All of my tests are done with GoogleTest (gtest-1.6.0) and almost everything is working fine except the warning mentioned in the title of this post. </p> <p>Here's the command line executed by netbeans as an example:</p> <pre><code>clang++ -pedantic-errors -lgtest -pthread -c -g -Wall -std=c++11 -pedantic-errors -lgtest -pthread -MMD -MP -MF build/Debug/CLang-Linux-x86/_ext/1802678175/main.o.d -o build/Debug/CLang-Linux-x86/_ext/1802678175/main.o ../GIT_CryptoCode/src/main.cpp </code></pre> <p>I don't know why, but the command contains twice some attributes which gives the same warning twice of course. This is what I did in the project properties : <img src="https://i.stack.imgur.com/nKxeB.png" alt="Properties of the project : C++ Compiler"> If I remove the Additional options, gtest is not working and the command line becomes something like this : <code>clang++ -c -g -Wall -std=c++11 ...</code>. What should I do to not get some attributes to be duplicates ?</p> <p>Well, even with cmake, I got the warning with Clang (which appears once this time :)). I also tested with GCC 4.7 and I didn't get any warning. Here's the command line I use in a cmake file for GCC :</p> <pre><code>set (CMAKE_CXX_FLAGS "-Winline -Wall -Werror -pedantic-errors -pthread -std=c++11") </code></pre> <p>Thus, Clang seems to be the problem. Is anyone know where this warning come from and how to remove it ? Is this a Clang bug ?</p> <p>Thanks for 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.
 

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