使用代码块在 64 位 windows 上使用 libpq-fe.h 构建,无法正确启动
Build with libpq-fe.h on 64 bit windows with codeblocks, cannot start correctly
在 windows 64 位上编译和 运行 带有代码块的程序、连接 postgresql 时遇到一些问题。 Postgresql 也是 64 位的。
我已经在 linux 下使用了 libpq-fe.h,在 64 位或 32 位上没有问题。现在,windows 我卡住了。
我在 windows 机器上安装了最新版本的 code::blocks,并使用了 GNU GCC 编译器。然后开始编码,一切正常,直到我包含 libpq-fe.h.
所以,32 位 vs 64 位的战斗(Libpq.dll:无法识别文件),所以我在 codeblocks 下安装和配置它。
经过 TIMESPEC 的一些麻烦后,终于编译成功了。但是没有启动。
第一个错误:
The program can't start because SSLEAY32.dll is missing from yout computer. Try reinstalling the program to fix this problem.
为了解决这个问题,我将 dll 从 postgresql 安装复制到 exe 路径。 libeay32.dll.
同样的问题
现在,当我启动我的 exe 时,我得到:
The application was unable to start correctly (0xc000007b). Click OK to close the application.
我认为以这种方式处理dll 不是一件好事。但是......我该如何解决这个错误?要检查什么?
找到窍门了。
为 windows 安装了 Openssl,在此处找到的最后一个 64 位版本:http://slproweb.com/products/Win32OpenSSL.html
现在运行正常了。
在 windows 64 位上编译和 运行 带有代码块的程序、连接 postgresql 时遇到一些问题。 Postgresql 也是 64 位的。
我已经在 linux 下使用了 libpq-fe.h,在 64 位或 32 位上没有问题。现在,windows 我卡住了。
我在 windows 机器上安装了最新版本的 code::blocks,并使用了 GNU GCC 编译器。然后开始编码,一切正常,直到我包含 libpq-fe.h.
所以,32 位 vs 64 位的战斗(Libpq.dll:无法识别文件),所以我在 codeblocks 下安装和配置它。
经过 TIMESPEC 的一些麻烦后,终于编译成功了。但是没有启动。
第一个错误:
The program can't start because SSLEAY32.dll is missing from yout computer. Try reinstalling the program to fix this problem.
为了解决这个问题,我将 dll 从 postgresql 安装复制到 exe 路径。 libeay32.dll.
同样的问题现在,当我启动我的 exe 时,我得到:
The application was unable to start correctly (0xc000007b). Click OK to close the application.
我认为以这种方式处理dll 不是一件好事。但是......我该如何解决这个错误?要检查什么?
找到窍门了。 为 windows 安装了 Openssl,在此处找到的最后一个 64 位版本:http://slproweb.com/products/Win32OpenSSL.html
现在运行正常了。