<div dir="ltr">Thank you for your answer.<div><br></div><div>I just want to find the file libmysql.dll because it's needed to be used with Qt (unless I did not understand how to use Qt's MySQL driver). </div><div>For now, I just do a simple copy of this file in my build folder, but it's not a good method.</div><div><br></div><div>Romain</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Le ven. 1 juin 2018 à 17:58, Juan E. Sanchez <<a href="mailto:juan.e.sanchez@gmail.com">juan.e.sanchez@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">My understanding is that you are supposed to link against the .lib file, <br>
and the .dll is used at runtime.<br>
<br>
From:<br>
<a href="https://dev.mysql.com/doc/refman/5.7/en/c-api-building-clients.html" rel="noreferrer" target="_blank">https://dev.mysql.com/doc/refman/5.7/en/c-api-building-clients.html</a><br>
<br>
You link your code with either the dynamic or static C client library. <br>
On Windows, the static library is named mysqlclient.lib and the dynamic <br>
library is named libmysql.dll. In addition, the libmysql.lib static <br>
import library is needed for using the dynamic library. If the static C <br>
client library is used, the client application must be compiled with the <br>
same version of Visual Studio used to compile the C client library <br>
(which is Visual Studio 2013 for the static C client library built by <br>
Oracle).<br>
<br>
<br>
Regards,<br>
<br>
Juan<br>
<br>
<br>
On 6/1/18 9:53 AM, Romain LEGUAY wrote:<br>
> Hi everyone,<br>
> <br>
> I try to find MYSQL dynamic library on windows.<br>
> For this, I use the following command:<br>
> <br>
> set(_PF86 "ProgramFiles(x86)")<br>
> find_library( MYSQL_LIBRARY<br>
> NAME "libmysql.dll"<br>
> PATHS "$ENV{PROGRAMFILES}/MySQL/*/lib"<br>
>    "$ENV{${_PF86}}/MySQL/*/lib"<br>
>    "$ENV{SYSTEMDRIVE}/MySQL/*/lib"<br>
>    NO_DEFAULT_PATH)<br>
> <br>
> This command doesn't work on my computer (Windows 10 Pro x64, CMake 3.11.3).<br>
> If I remove the .dll extension, find_library find libmysql.lib which is <br>
> in the same folder as libmysql.dll.<br>
> <br>
> How to say to CMake to use the name I chosen?<br>
> <br>
> Thank you!<br>
> Romain<br>
> <br>
> <br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div>