C++ ODBC cross-platform?

Good day, harrowdene doing cross-platform development of applications that try to do their lightweight and because of this, recently switched from Qt to wxWidgets. The problem is that in the latter there is no means for work with databases. (Recently closed)

I googled and found few options:

1) One team is doing apart from the wx team its technology to work with Postgres. So called wxPostgres.

Problem: is it Possible in the future, Postgres will change to something else, and then have to rewrite the project.

2) Find a cross-platform C++ library for working with ODBC.

Problem: I don't know what to choose, that was under 3 platforms (Windows, Linux, MAC OS X).

3) Use pure ODBC API.

Problem: a long way and "have to" write your own classes.

Who has cross-platform programming, you can share it? Thanks in advance!
October 8th 19 at 03:17
3 answers
October 8th 19 at 03:19
Okay, will have to answer for yourself.
What's the MySQL that Postgres there are some libraries related to C++ (++libmysqlclient and libpq respectively). I think they exist, and similarly for the other DBMS.

Tried so far only under Linux. Under Windows it's more complicated, but I think everyone is also solved.
October 8th 19 at 03:21
wxWidgets may legavenue, but they are noticeable brake than Qt, and almost never develop. I do not see any sense to use them.
Is there anything tests/evidence?
Thank you. - jordyn_Crem commented on October 8th 19 at 03:24
What kind of tests? What is the evidence? I started a topic on "What is better, Qt or wxWidgets?", I have a problem I need advice what to use in this situation. - Roslyn.Cummerata96 commented on October 8th 19 at 03:27
than using*
I apologize for my Russian. - Roslyn.Cummerata96 commented on October 8th 19 at 03:30
October 8th 19 at 03:23
Under linux and windows I am using libodbc++ (see libodbcxx.sourceforge.net). Code quality so-so, but the interface is similar to JDBC. On *nix (and possibly Mac — don't know) as the implementation of ODBC is better to use unixODBC (see www.unixodbc.org). Here you can see an example of use and to find information about the PostgreSQL driver.

If you have time try to write a post on this topic.

Find more questions by tags C++Cross-platform