Below is the example directory structure, on the basis of which, I would define my problem faced.
MySQL Connector Folder
|
|___bin
|
|___include
| |
| |___mysqlx
| |
| |___xdevapi.h
|
|___lib64
|
|___vs14
| |
| |___mysqlcppconn-static.lib
| |___libssl.lib
| |___extra.lib
| |___extra.lib
|
|___libssl-3-x64.dll
---------------------------------------------------------------
Project Folder
|
|___main.cpp
I have made the project in visual studio ide and wish to proceed further in that only.
So, what I have done is, in my main, I am using the #include "xdevapi.h"
, header and I have also set the directory for the additional include directories, in the project properties.
The problem comes in the linker part,
I mean, how can I determine, in which library are the functions for the xdevapi.h
defined in, are those declared functions a part of the dynamic library or the static library, which library, do I need to link.
For example, take that xdevapi.h
, just declares the functions, defined in the static library, mysqlcppconn-static.lib
, so I would just need to link that library in my project, all the other libraries would be unnecessary for this project. The extra.lib, would be extra here.
In short, if I could summarize my question, it would be how can I determine which library is required to include a specific header file in my code.
Tried, reading the documentation, was of no help, everything, just went over my head, had some cmake in it, which I don't understand a bit.
So, if there is any other way, it would be very helpful.
I just want to be able to determine, which library is required in my project and where could, I get that, if the documentation is complex to understand, I am kind of at beginner level of learning cpp.