Re: Compiling connector/C++ with Visual Studio 2015
Once you have all three available, open VS2012 x64 Native Tools Command Prompt and from the source root directory of the MySQL C++ Connector you need to issue the following:
set MYSQL_DIR=c:\PROGRA~1\MySQL\MYSQLC~1.1
cmake -G "Visual Studio 11 Win64" ^
-DBOOST_ROOT:STRING=C:\Users\user\DOWNLO~1\BOOST_~1\BOOST_~1 ^
-DMYSQL_LIB_DIR:STRING=c:\PROGRA~1\MySQL\MYSQLC~1.1\LIB
devenv.com MySQLCPPCONN.sln /build Release
The first command defines the MYSQL_DIR variable that points to the installation of the MySQL server or the MySQL C Connector. The second command call cmake to prepare a VS project that will be 64bit. There seems to be a problem with the MYSQL_LIB_DIR variable and it does not get generated, so we need to define it manually. MYSQL_LIB_DIR has the value of MYSQL_DIR ending with a \LIB. Third command is optional, it will build the project from command prompt without opening VS.
It is recommended that you use the DOS paths for the variables. To do that, navigate to the directory you want to convert to DOS path and call for %I in (.) do echo %~sI. It will give you the converted path.
Subject
Views
Written By
Posted
6220
December 31, 2015 08:34AM
2549
February 20, 2016 08:26AM
Re: Compiling connector/C++ with Visual Studio 2015
2530
February 26, 2016 06:15AM
2013
February 26, 2016 07:50AM
5246
March 07, 2016 10:27AM
2187
May 02, 2016 08:06AM
2664
May 21, 2016 08:02PM
2219
May 26, 2016 10:54AM
1833
May 26, 2016 03:16PM
1727
May 26, 2016 05:32PM
2396
June 01, 2016 08:45AM
1740
June 03, 2016 12:18PM
2056
June 08, 2016 04:02AM
2645
June 10, 2016 07:15AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.