maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #01443
New Question: mariaDB_client-1-0-0_win64 in Visual Studio 2012
Hello,
A new question has been asked in "Client libraries" by olivierf77:
--------------------------------
Hello,
I have installed MariaDB 5.6 , and its works perfectly. Thanks to all the MariaDB team.
I also installed (by *.msi) mariaDB_client-1-0-0_win64 in c:\L\SQLClient\mariadb_client-1.0.0-win64\
+ added paths as follow in project properties:
INCLUDE DIRECTORIES = C:\L\SQLClient\mariadb_client-1.0.0-win64\mariadbclient\include;$(IncludePath)
LIBRARY DIRECTORIES = C:\L\SQLClient\mariadb_client-1.0.0-win64\lib;$(LibraryPath)
However, when trying to use it even with the most simple programs, compilation is OK,
**BUT** linking fails:
--- my minimal c++ program (c++ console under Visual Studio 2012 ---
#include "stdafx.h"
#include <mysql.h>
int _tmain(int argc, _TCHAR* argv[])
{
MYSQL *my;
my = mysql_init(NULL);
}
-- end of program --
BUILDING PROJETS -> following error msg:
1>------ Build started: Project: cppconMariaDB02, Configuration: Debug Win32 ------
1>cppconMariaDB02.obj : error LNK2019: unresolved external symbol _mysql_init@4 referenced in function _wmain
1>c:\users\olivier\documents\visual studio 2012\Projects\cppconMariaDB02\Debug\cppconMariaDB02.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Every mysql function gets the same "unresolved external symbol" error, even though I believe I did specify the path to the directory containing the 3 files "libmariadb.dll, libmariadb.lib & mariadbclient.lib", which I even tried (for testing purposes only, and with no better results) to copy into windows/system32.
I have spent a lot of time on this issue, with no success. I did see that this question was asked several times on several programming sites, but it never gets any answer.
As additional info, here is my directory for the c mariadb_client client:
Directory of c:\L\SQLClient\mariadb_client-1.0.0-win64
<DIR> ..
docs
examples
html
lib
libmysql
mariadbclient
mysql_config
unittest
zlib
I hope that the above information (and question) is clear and complete, but not over verbose, and that someone in your team will have a few seconds to answer my query, even though the answer may be trivial (at least for him).
And once again, many thanks for a very nice product.
Sincerely yours
Olivier, Paris, France
PS And hello to Michael 'Monty' Widenus, whom I met in Paris six months ago.
--------------------------------
To view or answer this question please visit: http://mariadb.com/kb/en/mariadb_client-1-0-0_win64-in-visual-studio-2012/