qdaxb / mangaviewer

tool for reading comics
http://blog.2baxb.me/mangaviewer/
GNU General Public License v3.0
104 stars 15 forks source link

Up主你好 我下了源码编译出现问题 #2

Open llqy opened 8 years ago

llqy commented 8 years ago

我在qt官网下了最新版 Qt Creator 4.0.3 Based on Qt 5.7.0 (MSVC 2013, 32 bit) Built on Jul 5 2016 01:09:09 好像是Data_Reader.h 之类的库编译错误 编译输出为 ` 08:59:21: 为项目mangaviewer执行步骤 ... 08:59:21: 正在启动 "D:\Qt\Tools\mingw530_32\bin\mingw32-make.exe"

D:/Qt/Tools/mingw530_32/bin/mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory 'D:/Study/mangaviewer-0.1.0/build-mangaviewer-Desktop_Qt_5_7_0_MinGW_32bit-Debug' g++ -c -pipe -fno-keep-inline-dllexport -g -std=gnu++11 -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I..\src -I. -I./include -I..\src\qxtglobalshortcut -I......\Qt\5.7\mingw53_32\include -I......\Qt\5.7\mingw53_32\include\QtWidgets -I......\Qt\5.7\mingw53_32\include\QtGui -I......\Qt\5.7\mingw53_32\include\QtANGLE -I......\Qt\5.7\mingw53_32\include\QtXml -I......\Qt\5.7\mingw53_32\include\QtCore -Idebug -I. -I......\Qt\5.7\mingw53_32\mkspecs\win32-g++ -o debug\Zlib_Inflater.o ..\src\fex\Zlib_Inflater.cpp In file included from ..\src\fex\Zlib_Inflater.h:7:0, from ..\src\fex\Zlib_Inflater.cpp:3: ..\src\fex\Data_Reader.h: In member function 'virtual const char* Data_Reader::readv(void, int)': ..\src\fex\Data_Reader.h:53:84: error: invalid conversion from 'int' to 'blargg_errt {aka const char}' [-fpermissive] virtual blargg_err_t readv( void, int n ) BLARGG_PURE( { (void)n; return blargg_ok; } ) ^ ..\src\fex\blargg_common.h:52:28: note: in definition of macro 'BLARGG_PURE'

define BLARGG_PURE( def ) def

                        ^

..\src\fex\DataReader.h: In member function 'virtual const char File_Reader::seek_v(int)': ..\src\fex\Data_Reader.h:93:73: error: invalid conversion from 'int' to 'blargg_errt {aka const char}' [-fpermissive] virtual blargg_err_t seek_v( int n ) BLARGG_PURE( { (void)n; return blargg_ok; } ) ^ ..\src\fex\blargg_common.h:52:28: note: in definition of macro 'BLARGG_PURE'

define BLARGG_PURE( def ) def

                        ^

..\src\fex\ZlibInflater.cpp: In member function 'const char Zlib_Inflater::fill_buf(int)': ..\src\fex\Zlib_Inflater.cpp:68:9: error: invalid conversion from 'int' to 'blargg_errt {aka const char}' [-fpermissive] return blargg_ok; ^ ..\src\fex\ZlibInflater.cpp: In member function 'const char Zlib_Inflater::set_mode(Zlib_Inflater::mode_t, int)': ..\src\fex\Zlib_Inflater.cpp:128:9: error: invalid conversion from 'int' to 'blargg_errt {aka const char}' [-fpermissive] return blargg_ok; ^ ..\src\fex\ZlibInflater.cpp: In member function 'const char ZlibInflater::read(void, int_)': ..\src\fex\Zlib_Inflater.cpp:256:9: error: invalid conversion from 'int' to 'blargg_errt {aka const char}' [-fpermissive] return blarggok; ^ mingw32-make[1]: ** [debug/Zlib_Inflater.o] Error 1 mingw32-make: *\ [debug] Error 2 Makefile.Debug:1797: recipe for target 'debug/Zlib_Inflater.o' failed mingw32-make[1]: Leaving directory 'D:/Study/mangaviewer-0.1.0/build-mangaviewer-Desktop_Qt_5_7_0_MinGW_32bit-Debug' Makefile:34: recipe for target 'debug' failed 08:59:22: 进程"D:\Qt\Tools\mingw530_32\bin\mingw32-make.exe"退出,退出代码 2 。 Error while building/deploying project mangaviewer (kit: Desktop Qt 5.7.0 MinGW 32bit) When executing step "Make" 08:59:22: Elapsed time: 00:01. `

qdaxb commented 8 years ago

新版本的mingw和现在的代码有些冲突,你重新pull一下最新代码应该就不会出现这个问题了。

另外还发现了新版本qt和目前我用的全局快捷键库有些冲突,如果编译时报'qtxglobalshortcut'相关错误的话可以先屏蔽一下globalshortcut功能

mangaview.pro中注释掉

include(qxtglobalshortcut/qxtglobalshortcut.pri)

shortcutmanager.cpp中注释掉

                if(key.hasAttribute("global"))
                {
                    QString globalShortcut=key.text();
                    QxtGlobalShortcut *shortCut=new QxtGlobalShortcut();
                    QKeySequence seq(globalShortcut);
                    bool ok=shortCut->setShortcut(seq);
                    if(ok)
                    {
                        qDebug()<<"register success:"<<seq;
                        mGlobalShortcuts[shortCut]=CommandRegistry::get("Viewer"+command+"Command");
                        QObject::connect(shortCut,SIGNAL(activated(QxtGlobalShortcut*)),this,SLOT(globalShortcutActived(QxtGlobalShortcut*)));
                    }
                    else
                    {
                        qDebug()<<"register failed:"<<seq;
                       emit registerGlobalShortcutFailed(seq);
                    }

                }
                else

qtxglobalshortcut的问题我近期会修复。

llqy commented 8 years ago

谢谢UP主 我还没试 我主要想 让这软件加入 可以右键压缩文件选择 此软件打开这个功能,希望添加