相关文章推荐
高大的柚子  ·  python readlines ...·  11 月前    · 
越狱的人字拖  ·  使用fabric ...·  1 年前    · 
英勇无比的脸盆  ·  javascript - 返回 ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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

Where is the problem? Add the PostgreSQL header files to the include path and the libraries to the link path. Of course, you need 32-bit PostgreSQL to link to 32-bit executables. It is all quite simple. Laurenz Albe Jun 8, 2020 at 6:26

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

  • libpqxx v7 requires at least Visual Studio 2017 for C++17 support. https://github.com/jtv/libpqxx#upgrade-notes
  • 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.

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question . Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers .