将QuaZip与Qt 4.8.0链接到项目中

时间:2012-02-10 12:43:35

标签: quazip

我有一个项目,我想解压缩文件。 我发现Quazip接近我想要的实现(检查),但....

编译项目时构建项目

  

Makefile.Release:241:警告:覆盖目标的命令
  release/moc_quazipfile.o' Makefile.Release:219: warning: ignoring
old commands for target
释放/ moc_quazipfile.o'
  release \ moc_quazipfile.cpp:40:warning:'static void
  QuaZipFile :: qt_static_metacall(QObject *,QMetaObject :: Call,int,
  void **)'没有dllimport属性重新声明:之前的dllimport   忽略release \ moc_quazipfile.cpp:48:警告:
  'QuaZipFile :: staticMetaObjectExtraData'在没有dllimport的情况下重新声明   用dll链接引用后的属性
  release \ moc_quazipfile.cpp:52:警告:
  'QuaZipFile :: staticMetaObject'重新声明没有dllimport属性   用dll链接引用后   release \ moc_quazipfile.cpp:61:警告:'virtual const QMetaObject *   QuaZipFile :: metaObject()const'重新声明没有dllimport
  attribute:previous dllimport ignored release \ moc_quazipfile.cpp:66:   警告:'virtual void * QuaZipFile :: qt_metacast(const char *)'
  没有dllimport属性重新声明:之前的dllimport忽略了   release \ moc_quazipfile.cpp:74:警告:'virtual int
  QuaZipFile :: qt_metacall(QMetaObject :: Call,int,void * )'重新声明   没有dllimport属性:以前的dllimport忽略了   mingw32-make.exe [1]:离开目录“ *
  *
* quazip_test-集结桌面Qt_4_8_0_for_Desktop _- 的MinGW _Qt_SDK__Release”   release \ moc_quazipfile.cpp:48:错误:静态数据的定义
  dllimport'd类的成员'QuaZipFile :: staticMetaObjectExtraData'   mingw32-make.exe [1]: * [release / moc_quazipfile.o]错误1
  mingw32-make.exe:*
[发布]错误2 13:29:01:流程
  “C:\ QtSDK \ mingw \ bin \ mingw32-make.exe”退出代码2.错误时   构建项目quazip_test(目标:桌面)执行构建时   步'做'

的.pro:

QT       += core gui

TARGET = quazip_test
TEMPLATE = app

INCLUDEPATH += C:/QtSDK/QtSources/4.8.0/src/3rdparty/zlib

SOURCES += main.cpp\
        mainwindow.cpp \
    quazip/quazipnewinfo.cpp \
    quazip/quazipfile.cpp \
    quazip/quazip.cpp \
    quazip/quacrc32.cpp \
    quazip/qioapi.cpp \
    quazip/moc_quazipfile.cpp \
    quazip/JlCompress.cpp \
    quazip/quaadler32.cpp

HEADERS  += mainwindow.h \
    quazip/crypt.h \
    quazip/unzip.h \
    quazip/quaadler32.h \
    quazip/quazipnewinfo.h \
    quazip/quazipfileinfo.h \
    quazip/quazipfile.h \
    quazip/quazip_global.h \
    quazip/quazip.h \
    quazip/quacrc32.h \
    quazip/quachecksum32.h \
    quazip/JlCompress.h \
    quazip/ioapi.h \    
    quazip/zip.h

FORMS    += mainwindow.ui

mainwindow.h:

#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "quazip/quazip.h"
#include "quazip/quazipfile.h"


namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H

mainwindow.cpp:

#include "mainwindow.h"
#include "ui_mainwindow.h"


MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QuaZip *temp = new QuaZip();
}

MainWindow::~MainWindow()
{

    delete ui;
}

我做错了什么?

BR

0 个答案:

没有答案