example problem with mysql in visual c + +

hello friends after search and download the mysql, I tried to do the steps to make a database in c + +, the code is giving an example, but there lies the problem seems to me that something is missing
ver.cpp
C:\Program Files\MySQL\MySQL Connector C++ 1.1.1\include\mysql_connection.h(160) : warning C4251: 'sql::mysql::MySQL_Connection::proxy' : class 'boost::shared_ptr' necesita tener una interfaz DLL para que la utilicen los clientes de class 'sql::mysql::MySQL_Connection'
with
[
T=sql::mysql::NativeAPI::NativeConnectionWrapper
]
Vinculando...
LINK : fatal error LNK1181: no se puede abrir el archivo de entrada 'kernel32.lib'

how rare is the kernel library that I never had problems
You may be missing something like this ?

#pragma comment(lib, "kernel32.lib")

If you are using VS look into
project->properties->configuration properties->linker->input
and add the library in additional dependencies
There is also a VS directories tab to include libraries

You can also try the shortcut of placing the library in your source folder.

Just ideas..
The solution, I found reading the MySQL documentation.
had to follow these steps
****
By default CPPCONN_PUBLIC_FUNC is defined to declare functions to be compatible with an application that calls a DLL. If building an application to call the static library, ensure that function prototypes are compatible with this. In this case, define CPPCONN_PUBLIC_FUNC to be an empty string, so that functions are declared with the correct prototype.
In the PROJECT, PROPERTIES tree view, under C++, PREPROCESSOR, enter CPPCONN_PUBLIC_FUNC= into the PREPROCESSOR DEFINITIONS text field.
If building an application to use the MySQL Connector/C++ dynamically linked library carry out these steps:
1. Under LINKER, INPUT, add mysqlcppconn.lib into the ADDITIONAL DEPENDENCIES text field.
2. mysqlcppconn.dll must be in the same directory as the application executable, or somewhere on the system's path, so that the application can access the MySQL Connector/C++ Dynamic Linked Library at runtime.
Copy mysqlcppconn.dll to the same directory as the application. Alternatively, extend the PATH environment variable using SET PATH=%PATH%;C:\path\to\cpp. Alternatively, you can copy mysqlcppconn.dll to the Windows installation Directory, typically c:\windows.
:) get for not reading the documentation and read tutorials
Topic archived. No new replies allowed.