MySQL Forums
Forum List  »  Connector/C++

Re: Compiling connector/C++ with Visual Studio 2015
Posted by: sam benegal
Date: February 26, 2016 06:15AM

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:

cmake -G "Visual Studio 11 Win64" ^
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.

Options: ReplyQuote

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.