0

i want to connect postgreSQL with my C++ win32 console application using "libpqxx" with MS Visual Studio 2013 I tried to search the whole internet but did'nt find any solution or even not any proper tutorial or document on how i can connect that but found nothing. after 3 weeks of research i'm fed up now but i'm still searching and want to know the proper steps o do this. I have already installed the following MS Visual Studio 2013 PostrgeSQL and downloaded LIBPQXX latest version

OS Window 10

i want to know the step by step library/api linking and connection guide and i will be very thankful if you are able to provide or attach some images related to steps that help in understanding this all.

and also can i use to build that pqxx library if yes then please tell me how can i do that.

That task related to my university project so please can someone help me i did'nt have much information about libpqxx and how to connect libraries or build them and searched alot about this libpqxx

Thank you in advance

1 Answers1

1

You can't with the latest two versions of libpqxx because VS 2013 doesn't support the necessary C++ language specs:

The 7.x versions require C++17. However, it's probably not a problem if your compiler does not implement C++17 fully. Initially the 7.x series will only require some basic C++17 features such as std::string_view. More advanced use may follow later.

  • libpqxx v6 requires at least Visual Studio 2015 for C++11 support. Note that this is so even though the libpqxx has a "VisualStudio2013" folder inside of config/sample-headers/compiler. https://github.com/jtv/libpqxx/releases/tag/6.0.0. (VS 2013 doesn't support, probably among other features, noexcept).

C++11 is now required. Your compiler must have shared_ptr, noexcept, etc.

Also, inferring from the release notes that C++11 is required as of v6, that presumably means that v5 would be the last version that could be built under VS 2013.

Kdawg
  • 1,508
  • 13
  • 19