简体   繁体   English

使用 Visual Studio 2013 链接/安装“libpqxx”,用于 C++ 与 PostgrSQL 的连接

[英]Linking/Installing “libpqxx” with Visual Studio 2013 for C++ Connection with PostgrSQL

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.我想使用“libpqxx”和 MS Visual Studio 2013 将 postgreSQL 与我的 C++ win32 控制台应用程序连接起来没有什么。 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.经过 3 周的研究,我现在受够了,但我仍在寻找,想知道正确的步骤。 I have already installed the following MS Visual Studio 2013 PostrgeSQL and downloaded LIBPQXX latest version我已经安装了以下 MS Visual Studio 2013 PostrgeSQL 并下载了 LIBPQXX 最新版本

OS Window 10操作系统 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.我想知道分步库/api链接和连接指南,如果您能够提供或附上一些与有助于理解这一切的步骤相关的图像,我将非常感激。

and also can i use to build that pqxx library if yes then please tell me how can i do that.如果可以,我也可以用来构建那个 pqxx 库,那么请告诉我该怎么做。

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该任务与我的大学项目有关,所以请有人帮助我,我没有太多关于 libpqxx 以及如何连接库或构建它们的信息,并且搜索了很多关于这个 libpqxx

Thank you in advance先感谢您

You can't with the latest two versions of libpqxx because VS 2013 doesn't support the necessary C++ language specs:您不能使用最新的两个版本的 libpqxx,因为 VS 2013 不支持必要的 C++ 语言规范:

The 7.x versions require C++17. 7.x 版本需要 C++17。 However, it's probably not a problem if your compiler does not implement C++17 fully.但是,如果您的编译器没有完全实现 C++17,这可能不是问题。 Initially the 7.x series will only require some basic C++17 features such as std::string_view.最初,7.x 系列将只需要一些基本的 C++17 功能,例如 std::string_view。 More advanced use may follow later.以后可能会有更高级的使用。

  • libpqxx v6 requires at least Visual Studio 2015 for C++11 support. libpqxx v6 至少需要 Visual Studio 2015 才能获得 C++11 支持。 Note that this is so even though the libpqxx has a "VisualStudio2013" folder inside of config/sample-headers/compiler.请注意,即使 libpqxx 在 config/sample-headers/compiler 中有一个“VisualStudio2013”文件夹也是如此。 https://github.com/jtv/libpqxx/releases/tag/6.0.0 . https://github.com/jtv/libpqxx/releases/tag/6.0.0 (VS 2013 doesn't support, probably among other features, noexcept). (VS 2013 不支持,可能在其他功能中,noexcept)。

C++11 is now required.现在需要 C++11。 Your compiler must have shared_ptr, noexcept, etc.你的编译器必须有 shared_ptr、noexcept 等。

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.此外,从发布说明中推断,从 v6 开始需要 C++11,这可能意味着 v5 将是可以在 VS 2013 下构建的最后一个版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM