On RHEL 8, using Postgres 12.
When I attempt to run a C++ application that uses log4cxx and an ODBCAppender to write some statements to a Postgres DB, I get the following error message:
log4cxx: Can not activate ODBCAppender unless compiled with ODBC support.
The above error message occurs when the following line is called in the C++ application:
PropertyConfigurator::configure(homedir + "/.myapp_config/myapp_log_config");
What do I need to do to compile my C++ application with ODBC support??
That error is being printed from log4cxx itself. When the library was compiled, ODBC was not available, so support was not compiled in. Make sure that the ODBC headers are installed and re-compile the log4cxx library. On Debian/Ubuntu, this should be as easy as installing the
unixodbc-devpackage on your system; I'm not sure what the package name on RHEL is.