Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The error is telling you the problem. It cannot find gtest.lib. I just provided a <a href="https://meta.stackexchange.com/questions/22754/sscce-how-to-provide-examples-for-programming-questions">SSCCE</a> to show this does work. First read over the <a href="http://code.google.com/p/googletest/wiki/Documentation" rel="nofollow noreferrer">gtest documentation</a> and note you will need to build the libraries from source. When doing so, while using MSVC, you'll encounter errors because MSVC does not support something to do with <a href="https://stackoverflow.com/questions/8274588/c2977-stdtuple-too-many-template-arguments-msvc11">variadics</a>? I used <a href="http://code.google.com/p/googletest/issues/detail?id=412" rel="nofollow noreferrer">this solution</a> and will outline it here in spirit of not providing the answer via links.</p> <p>Step 1: Download <a href="http://code.google.com/p/googletest/downloads/list" rel="nofollow noreferrer">gtest 1.6</a></p> <p>Step 2: Extract to directory, DIR.</p> <p>Step 3: Navigate to DIR/msvc</p> <p>Step 4: Double click gtest-md.sln and migrate if you need to. You'll get some warnings.</p> <p>Step 5: For <strong>each</strong> project in the solution, right click and add this to preprocessor definitions in C/C++. <code>_VARIADIC_MAX=10</code></p> <p>Step 6: Build Solutions.</p> <p>Step 7: Navigate to <code>DIR/msvc/gtest-md/Debug/</code> This folder has the gtestd.lib as well as gtest-main-mdd.lib file. I took the entire contents of <code>Debug</code> pasted it in a new folder <code>DIR/lib</code>. </p> <p>Step 8: Create a new blank sol and a new blank project. Add a new blank .cpp. </p> <p>Step 9: Goto <code>Project-&gt;Properties-&gt;vc++ directories</code> Add <code>DIR/Include</code> under the additional include libraries and the <code>DIR/lib</code> under the additional library dependencies. </p> <p>Step 10: Goto <code>Linker-&gt;Input</code> and under additional dependencies add <code>gtestd.lib</code>. </p> <p>Step 11: Goto <code>C/C++-&gt;Preprocessor</code> and under preprocessor definitions add <code>_VARIADIC_MAX=10</code></p> <p>Step 12: In source add</p> <pre><code>#include &lt;gtest/gtest.h&gt; //Or wherever your header file seems to be int main() { return 0; } </code></pre> <p>This is what I did and I have created a SSCCE for this library. If you are not then you need to consider if you created the .lib incorrectly or haven't pointed msvc towards the right directory for the library. </p>
 

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