{"id":273899,"date":"2016-02-09T15:33:02","date_gmt":"2016-02-09T12:33:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=273899"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=273899","title":{"rendered":"Nuget++ \u0434\u043b\u044f \u0431\u0435\u0434\u043d\u044b\u0445"},"content":{"rendered":"<p>       \u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043f\u0438\u0448\u0435\u0442\u0435 \u043d\u0430 C++ \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a (\u043e\u043a\u0440\u043e\u043c\u044f boost) \u0438 \u0432\u0430\u043c \u043d\u0430\u0434\u043e\u0435\u043b\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u0438 \u0434\u043e \u043f\u0430\u043f\u043e\u043a \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u0438 lib-\u0430\u043c\u0438, \u0442\u043e \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u0412\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 ConsoleApplication \u0432 VisualStudio, \u0434\u0430\u0431\u044b \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0443\u044e \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0438\u0434\u0435\u044e, \u044f \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u044e \u0431\u043e\u043b\u044c. \u0411\u043e\u043b\u044c \u043e\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 <b>Properties-&gt;C\/C++-&gt;General-&gt;Additional Include Directories<\/b> \u0438 <b>Properties-&gt;Linker-&gt;General-&gt;Additional Library Directories<\/b>.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432 Solution-\u0435 1-3 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043f\u0430\u0440\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0442\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u0442\u0435\u0440\u043f\u0438\u043c\u043e, \u043d\u043e \u0434\u043b\u044f &gt;10 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 &gt; 5 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0432\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u0418 \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043c\u043e\u0435 \u0442\u0435\u0440\u043f\u0435\u043d\u0438\u0435 \u043b\u043e\u043f\u043d\u0443\u043b\u043e, \u044f \u0440\u0435\u0448\u0438\u043b \u043a\u0430\u043a-\u0442\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0412\u0437\u044f\u0432 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u043b\u044f boost-\u0430, \u0441\u0442\u0430\u043b \u0432\u044b\u043f\u0438\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u0427\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<ol>\n<li> \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u0443\u0442\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044f 2-\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0433\u043e include-a, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0433\u043e \u0438\u043c\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440\n<pre><code class=\"cpp\">#include &lt;gtest\/gtest.h&gt; #include &lt;vsqlite\/connection.hpp&gt; <\/code><\/pre>\n<p>   <\/li>\n<li>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 *.lib \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 *.hpp \u0444\u0430\u0439\u043b\u0430<\/li>\n<li>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 x86\/x64, Debug\/Release, Static\/Dynamic Runtime<\/li>\n<li>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443<\/li>\n<\/ol>\n<p><a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0442\u043e\u0438\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0430\u043f\u043a\u043e\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f.\u0423 \u043c\u0435\u043d\u044f \u044d\u0442\u043e C:\/nuget++. \u0412\u043d\u0443\u0442\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u043f\u0430\u043f\u043a\u0438 <b>include<\/b>,<b>lib\/x86<\/b>,<b>lib\/x64<\/b>,<b>projects<\/b>. \u0421 \u043f\u0435\u0440\u0432\u044b\u043c\u0438 3-\u043c\u044f \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0430 \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u043f\u0430\u043f\u043a\u0435 \u044f \u0445\u0440\u0430\u043d\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u044d\u0442\u0438\u0445 \u0441\u0430\u043c\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. <\/p>\n<p>  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"https:\/\/github.com\/google\/googletest\/tree\/master\/googletest\">gtest<\/a>, \u0440\u0430\u0437\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0435\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443 projects \u0438 \u043e\u0442\u043a\u0440\u043e\u0435\u043c gtest-md.sln \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 msvc.<\/p>\n<p>  <img decoding=\"async\" align=\"right\" width=\"320\" src=\"https:\/\/habrastorage.org\/files\/a69\/ec6\/790\/a69ec679061d46d19dce7aa74a2a7aae\"\/>\u0414\u0430\u043b\u0435\u0435, \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u0438\u043a\u0438 \u0438\u0437 <b>projects\/gtest\/include\/gtest<\/b> \u0432 <b>include\/gtest\/<\/b>. \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 nuget++\/include \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 c++. \u0412 Visual Studio 2015 (\u0438, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043c\u043d\u044e, \u0432 2013 \u0442\u043e\u0436\u0435) \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0443\u0442\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044f \u043e\u043a\u043d\u0430 Property Manager (<b>View-&gt;Property Manager<\/b>), \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 <b>Microsoft.Cpp.Win32.user<\/b> \u0438 <b>Microsoft.Cpp.x64.user<\/b> \u0432 \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u043b\u044e\u0431\u043e\u0433\u043e C++ \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e, \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043b <b>Common Properties-&gt;C\/C++-&gt;General-&gt;Additional Include Directories<\/b>-\u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0442\u0443\u043f\u0430 \u043f\u0443\u0442\u044c \u0434\u043e include-\u043f\u0430\u043f\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e nuget, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <b>C:\\nuget++\\include;%(AdditionalIncludeDirectories)<\/b>.<\/p>\n<p>  \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f 2-\u0433\u043e \u0438 3-\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 4 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f x86\/x64 \u0438 Static\/Dynamic Runtime. \u0412 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u0438\u043c\u044f \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 runtime-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 <b>Properties-&gt;Configuration Properties-&gt;General-&gt;Target Name<\/b> \u0438 <b>Properties-&gt;Configuration Properties-&gt;C\/C++-&gt;Code Generation<\/b>.  <\/p>\n<table>\n<tr>\n<td><b>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/b><\/td>\n<td><b>\u0418\u043c\u044f \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430<\/b><\/td>\n<td><b>Runtime \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430<\/b><\/td>\n<\/tr>\n<tr>\n<td>Release Static Runtime<\/td>\n<td>$(ProjectName)-vc$(PlatformToolsetVersion)-mt-s<\/td>\n<td>Multi-threaded (\/MT)<\/td>\n<\/tr>\n<tr>\n<td>Release Dynamic Runtime<\/td>\n<td>$(ProjectName)-vc$(PlatformToolsetVersion)-mt<\/td>\n<td>Multi-threaded DLL (\/MD)<\/td>\n<\/tr>\n<tr>\n<td>Debug Static Runtime<\/td>\n<td>$(ProjectName)-vc$(PlatformToolsetVersion)-mt-sgd<\/td>\n<td>Multi-threaded Debug (\/MTd)<\/td>\n<\/tr>\n<tr>\n<td>Debug Dynamic Runtime<\/td>\n<td>$(ProjectName)-vc$(PlatformToolsetVersion)-mt-gd<\/td>\n<td>Multi-threaded Debug DLL (\/MDd)<\/td>\n<\/tr>\n<\/table>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0432 batch-build, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c 2 \u0433\u0440\u0443\u043f\u043f\u044b(x86 \u0438 x64) \u043f\u043e 4 lib-\u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432 \u043f\u0430\u043f\u043a\u0438 <b>lib\/x86<\/b> \u0438 <b>lib\/x64<\/b>.<br \/>  \u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0448\u0430\u043c\u0430\u043d\u0438\u0442\u044c \u043d\u0430\u0434 \u0441\u0430\u043c\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439.\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0444\u0430\u0439\u043b auto_link.hpp \u0438 \u0437\u0430-include-\u0438\u043c \u0435\u0433\u043e \u0438\u0437 \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u041f\u043e\u043a\u043e\u043f\u0430\u0432\u0448\u0438\u0441\u044c \u0432 MSDN \u043d\u0430 \u0442\u0435\u043c\u0443 \u043a\u043b\u044e\u0447\u0435\u0439 \/MT,\/MD,\/MTd,\/MDd \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432. \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0430\u0433\u0438\u0438 \u0441 \u043c\u0430\u043a\u0440\u043e\u0441\u0430\u043c\u0438 \u0438 auto_link.hpp \u0433\u043e\u0442\u043e\u0432:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">auto_link.hpp<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#pragma once  #if _MSC_VER == 1500 #define  GTEST_LIB_TOOLSET  &quot;vc90&quot; #elif _MSC_VER == 1600 #define  GTEST_LIB_TOOLSET  &quot;vc100&quot; #elif _MSC_VER == 1700 #define  GTEST_LIB_TOOLSET  &quot;vc110&quot; #elif _MSC_VER == 1800 #define  GTEST_LIB_TOOLSET  &quot;vc120&quot; #elif _MSC_VER == 1900 #define  GTEST_LIB_TOOLSET  &quot;vc140&quot; #endif   #if defined(_MT) || defined(__MT__) #  define GTEST_LIB_THREAD_OPT &quot;mt&quot; #else #  define GTEST_LIB_THREAD_OPT #endif   #if defined(_DEBUG) #if defined(_DLL) #  define GTEST_LIB_RT_OPT &quot;-gd&quot; #else #  define GTEST_LIB_RT_OPT &quot;-sgd&quot; #endif #else #if defined(_DLL) #  define GTEST_LIB_RT_OPT &quot;&quot; #else #  define GTEST_LIB_RT_OPT &quot;-s&quot; #endif #endif  #ifndef GTEST_LIB \t#define GTEST_LIB_FULL_NAME &quot;gtest-&quot; GTEST_LIB_TOOLSET &quot;-&quot; GTEST_LIB_THREAD_OPT GTEST_LIB_RT_OPT &quot;.lib&quot; \t#pragma comment(lib, GTEST_LIB_FULL_NAME) \t#pragma message(&quot;linking to gtest:&quot; GTEST_LIB_FULL_NAME) #endif <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u0447\u0435\u043a \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cpp\">#include &lt;gtest\/gtest.h&gt; int main(int argc, char** argv) { \t::testing::InitGoogleTest(&argc, argv); \treturn RUN_ALL_TESTS(); }  TEST(autolink_tests, can_autolink_gtests){} <\/code><\/pre>\n<p>  Build \u0438 \u0432\u0443\u0430\u043b\u044f:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/552\/2b9\/20e\/5522b920e6d448a1a74485e16bd9642f\"\/><\/p>\n<p>  \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f(4 \u043f\u0443\u043d\u043a\u0442) \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0443\u0442\u0438 \u0434\u043e \u043f\u0430\u043f\u043e\u043a include, lib\/x86 \u0438 lib\/x64.<\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u043d\u0443\u0441\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 boost, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c hpp,lib \u0438 dll \u0444\u0430\u0439\u043b\u044b \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438. \u0412 \u0438\u0442\u043e\u0433\u0435, \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 1 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0434\u0435\u043d\u044c \u043d\u0430 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0441\u043e\u0432\u0435\u0433\u043e <i>nuget++ \u0434\u043b\u044f \u0431\u0435\u0434\u043d\u044b\u0445<\/i>, \u044f \u0438\u0437\u0431\u0430\u0432\u0438\u043b\u0441\u044f \u043e\u0442 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0431\u043e\u043b\u0438 \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0445\u043e\u0434\u043e\u0432\u044b\u0445 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a. \u0421\u0435\u0439\u0447\u0430\u0441 \u0432 \u043c\u043e\u0435\u043c \u0430\u0440\u0441\u0435\u043d\u0430\u043b\u0435 boost, cryptopp, gmock, gtest, jsoncpp, pugixml, vsqlite \u0438 \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u0442\u0441\u044f. \u0412 \u043f\u043b\u0430\u043d\u0430\u0445 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u0439 Solution \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Build event-\u044b \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0446\u0435\u043b\u0435\u0432\u044b\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/276883\/\"> https:\/\/habrahabr.ru\/post\/276883\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043f\u0438\u0448\u0435\u0442\u0435 \u043d\u0430 C++ \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a (\u043e\u043a\u0440\u043e\u043c\u044f boost) \u0438 \u0432\u0430\u043c \u043d\u0430\u0434\u043e\u0435\u043b\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u0438 \u0434\u043e \u043f\u0430\u043f\u043e\u043a \u0441 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u0438 lib-\u0430\u043c\u0438, \u0442\u043e \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u0412\u0441\u044f\u043a\u0438\u0439 \u0440\u0430\u0437, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 ConsoleApplication \u0432 VisualStudio, \u0434\u0430\u0431\u044b \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0443\u044e \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u0438\u0434\u0435\u044e, \u044f \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u044e \u0431\u043e\u043b\u044c. \u0411\u043e\u043b\u044c \u043e\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0430\u0445 <b>Properties-&gt;C\/C++-&gt;General-&gt;Additional Include Directories<\/b> \u0438 <b>Properties-&gt;Linker-&gt;General-&gt;Additional Library Directories<\/b>.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432 Solution-\u0435 1-3 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043f\u0430\u0440\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0442\u043e \u0432\u0441\u0435 \u0435\u0449\u0435 \u0442\u0435\u0440\u043f\u0438\u043c\u043e, \u043d\u043e \u0434\u043b\u044f &gt;10 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 &gt; 5 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0432\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u0418 \u043a\u043e\u0433\u0434\u0430 \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043c\u043e\u0435 \u0442\u0435\u0440\u043f\u0435\u043d\u0438\u0435 \u043b\u043e\u043f\u043d\u0443\u043b\u043e, \u044f \u0440\u0435\u0448\u0438\u043b \u043a\u0430\u043a-\u0442\u043e \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0412\u0437\u044f\u0432 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u043b\u044f boost-\u0430, \u0441\u0442\u0430\u043b \u0432\u044b\u043f\u0438\u043b\u0438\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u0427\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<ol>\n<li> \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u0443\u0442\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u044f 2-\u0445 \u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0433\u043e include-a, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0433\u043e \u0438\u043c\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440\n<pre><code class=\"cpp\">#include &lt;gtest\/gtest.h&gt; #include &lt;vsqlite\/connection.hpp&gt; <\/code><\/pre>\n<p>   <\/li>\n<li>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 *.lib \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 *.hpp \u0444\u0430\u0439\u043b\u0430<\/li>\n<li>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 x86\/x64, Debug\/Release, Static\/Dynamic Runtime<\/li>\n<li>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443<\/li>\n<\/ol>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-273899","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/273899","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=273899"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/273899\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=273899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=273899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=273899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}