zoukankan      html  css  js  c++  java
  • 在Windows上使用MSVC编译QuaZip

    QuaZip现在已经可以用MSVC在Windows上编译成功了。

    构建可使用CMake或qmake都可以。

    但目前(0-4-3)的原有脚本有些问题,会出现errror C2491,怀疑是有个宏定义误写错导致。

    编译过程及问题解决:


    1. Used CMake (或qmake)  to configure QuaZIP and generate VS solution file;
    2. Tried to compile Debug and got missing ‘zlib.h’ problem;
    3. Added path to Qt copy of zlib (in my case “C:/Qt/4.7.4/src/3rdparty/zlib”) to C/C++->General->Additional Include Directories;
    4. That fixed missing ‘zlib.h’ but then I got “error C2491: dllimport static” issue on QuaZipFile::staticMetaObject;
    5. Checked preprocessor definitions for quazip project (C/C++->Preprocessor->Preprocessor Definitions” and found thatQUAZIP_BUILD is not defined (it should be) — instead there is a useless define “quazip_EXPORTS” which was probably supposed to be QUAZIP_BUILD but CMake configuration for VisualStudio is buggy;
    6. Got rid of quazip_EXPORTS and added QUAZIP_BUILD — now at least Debug configuration builds! 把这个宏定义修改过来就可以了

  • 相关阅读:
    hive笔记
    hive数据倾斜的解决办法
    Kafka笔记7
    kafka笔记6
    Kafka笔记5
    kafka笔记4(2)
    kafka笔记4
    Kafka笔记3
    kafka笔记2
    kafka笔记1
  • 原文地址:https://www.cnblogs.com/justin_s/p/2247210.html
Copyright © 2011-2022 走看看