无法使用LibHaru,因为找不到zlib的引用
Cannot use LibHaru because cannot find the reference of zlib
我正在尝试构建一个程序,有望创建动态。pdf文件。我已经用PHP开发了一个类似的web项目,但现在我想用c++写它。
这导致我在过去的四天里重建了这三个库(zlib, libpng和libharu)超过三次。我已经阅读了网络上所有相关的条目(包括这个堆栈溢出条目),我知道我的问题是编译器找不到zlib(也许我理解错了问题)
我想解释我所做的事。请注意,我在Windows 7中使用Codeblocks IDE与GNU GCC c++编译器(MingGW)。首先,我编译了zlib 1.2.7并创建了我的zlib。静态库文件(我使用的是静态库)。其次,我编译了libpng 1.5.13,并创建了我的libpnga。第三,我编译了libharu(快照),创建了我的libharu。静态库文件。然后我将这些库文件添加到我的项目中。(我做了这里解释的所有事情)。最后,编译了我的项目。
好吧,我应该说所有的步骤我做了十多次,改变了一些小的东西,但每次我都得到一个错误。我甚至试过libharu.org上的官方例子。最奇怪的是,我的错误是不稳定的。几乎每次我都有不同的错误!但主要是与hpdf_streams.c有关。
我最近的日志文件:
C:Libslibharu-201301131604libharu.a(hpdf_streams.o):hpdf_streams.c:(.text+0xd4a): undefined reference to `deflateInit_'
C:Libslibharu-201301131604libharu.a(hpdf_streams.o):hpdf_streams.c:(.text+0xdfa): undefined reference to `deflate'
C:Libslibharu-201301131604libharu.a(hpdf_streams.o):hpdf_streams.c:(.text+0xe78): undefined reference to `deflateEnd'
C:Libslibharu-201301131604libharu.a(hpdf_streams.o):hpdf_streams.c:(.text+0xee2): undefined reference to `deflate'
C:Libslibharu-201301131604libharu.a(hpdf_streams.o):hpdf_streams.c:(.text+0xf7e): undefined reference to `deflateEnd'
C:Libslibharu-201301131604libharu.a(hpdf_streams.o):hpdf_streams.c:(.text+0xfb7): undefined reference to `deflateEnd'
C:Libslibharu-201301131604libharu.a(hpdf_streams.o):hpdf_streams.c:(.text+0xff1): undefined reference to `deflateEnd'
我们刚刚遇到了这个问题。你需要重新编译zlib,关闭WIN_API。或者使用dll而不是静态库。
相关文章:
- std::map<struct,struct>::find 找不到匹配项,但是如果我循环通过 begin() 到 end(),我在那里看到匹配项
- 找不到成员对象:没有名为get_event()的成员,也处理多态性和向量
- 为什么野牛仍在使用"int yylex(void)",却找不到"int yylex(YYS
- C++ Windows 驱动程序MSB3030无法复制该文件,因为它找不到
- 奇怪的(对我来说)返回声明 - 在谷歌上找不到任何关于它的信息
- 找不到QtResource文件中的文件
- VC++本机单元测试,找不到调试符号
- RegGetValue在当前用户下找不到名称
- 带有 -stdlib=libc++ 的 clang++ 9.0.1 找不到<optional>
- c++找不到具有相同哈希的无序集合元素
- 找不到以下加速库:boost_fiber
- 找不到 FLTK(缺少:FLTK_INCLUDE_DIR)
- 设置 Visual Studio for MPI: 找不到标识符错误
- "assimp/config.h"找不到,但它在文件夹中
- 链接器找不到在虚拟类 c++ 中访问的静态字段的符号
- C++系统找不到指定的文件错误
- FindPackageHandleStandardArgs.cmake:137 的 CMake 错误(消息):找不到 Boost (缺少:正则表达式)(找到合适的版本"1.72.0",
- vcpkg 添加新库,但找不到
- 找不到所需的 Zlib 库
- 无法使用LibHaru,因为找不到zlib的引用