SAP/odbc-cpp-wrapper

where is it include path?

Sallee1 opened this issue · 3 comments

I did not find the include directory, including project files and generated binaries

mrylov commented

Hi @Sallee1,

Please use the instructions given in the README how to build and install the library. Once all steps are done, you can include the headers, that are normally located in /usr/local/include/odbc, as follows:

#include <odbc/Connection.h>
#include <odbc/Environment.h>

int main()
{
        odbc::EnvironmentRef env = odbc::Environment::create();

        odbc::ConnectionRef conn = env->createConnection();
        conn->connect("DSN", "user", "pass");
        conn->setAutoCommit(false);
}

What should I do on Windows11 x64?

mrylov commented

There are two options for Windows:
Option 1: use Visual Studio 2015 or later
Option 2: use MSBuild (nmake)

Option 2 will install the library and header files. CMake will install them to C:\Program Files\odbccpp by default. If you prefer a different location, you can set CMake's install prefix to a different path. See https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html for details.

Please read the README carefully.