Dear users/developers,

I have succeeded in compiling chessX. I changed those OF macro calls in quazip/ioapi.h, adding the lines

#ifdef _Z_OF
#undef OF
#define OF _Z_OF
#endif

just before the typedefs, as suggested in this page. I will not claim I understood what I did, but since it worked for me, maybe it will be useful to someone else also.

Christos Gitsis


2014-03-27 0:08 GMT+02:00 Gitsis Christos <cgitsis@gmail.com>:
Thank you for your reply.

A month later, a new release of chessX and I still can't compile it, those typedefs inside quazip/ioapi.h seem to confuse my compiler. I tried your suggestion, but I think it is trying to solve a link error, while my process fails earlier.

I have successfully compiled quazip 0.5.1 as a library on my computer (through the package manager of my linux distribution). I tried using those HEADER files (located in /usr/include/quazip) in chessx.pro instead of the provided quazip, removing the SOURCES (*.cpp files), and linking against my local library which is located in /usr/lib64/libquazip.so. I am not sure I did it correctly, nor if something else was also needed.

Could someone give me appropriate instructions on what I am trying to do, if it is even possible? My QT configuration is the following:

#configuration
CONFIG += shared def_files_disabled exceptions no_mocdepend release stl qt_no_framework
QT_ARCH = x86_64
QT_EDITION = OpenSource
QT_CONFIG += minimal-config small-config medium-config large-config full-config shared reduce_exports reduce_relocations ipv6 clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify no-mng no-tiff system-freetype system-zlib nis iconv glib openssl-linked alsa concurrent release dbus dbus-linked declarative mitshm tablet x11sm xcursor xfixes xinput xkb xrandr xrender xshape xsync fontconfig system-freetype gif png system-png jpeg system-jpeg accessibility xvideo opengl script svg webkit xmlpatterns

#versioning
QT_VERSION = 4.8.5
QT_MAJOR_VERSION = 4
QT_MINOR_VERSION = 8
QT_PATCH_VERSION = 5

#namespaces
QT_LIBINFIX =
QT_NAMESPACE =
QT_NAMESPACE_MAC_CRC =

QT_GCC_MAJOR_VERSION = 4
QT_GCC_MINOR_VERSION = 8
QT_GCC_PATCH_VERSION = 1

I really want to compile chessx.






2014-02-18 22:09 GMT+02:00 Jens Nissen <jens-chessx@gmx.net>:

Compiling quazip can be tricky as the presence of the underlying compression routines depends on the way your Qt is compiled.
Thus try to play around with -lz and the path to the associated zlib header files.
See the part from chessx.pro where I had to resolve to the following code unter Windows:
!win32 {
    CONFIG(debug, debug|release) {
        LIBS += -lz
    }
    CONFIG(release, debug|release) {
        LIBS += -lz
    }
}

Perhaps, you need to do something similar.

Jens

Am 15.02.2014 um 09:25 schrieb Gitsis Christos <cgitsis@gmail.com>:

Hello,

I cannot compile it under linux, g++ (Gentoo 4.8.1-r1 p1.2, pie-0.5.7) 4.8.1

What might be the problem?

g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQUAZIP_STATIC
-DQT_NO_CAST_TO_ASCII -DQT_USE_QSTRINGBUILDER -DQT_NO_DEBUG_OUTPUT
-DNDEBUG -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_XML_LIB -DQT_GUI_LIB
-DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore
-I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui
-I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSvg -I/usr/include/qt4
-Isrc/database -Isrc/guess -Isrc/gui -Isrc/quazip
-I/usr/src/3rdparty/zlib -Isrc/generated -Isrc/generated -o
obj_rel/mainwindow.o src/gui/mainwindow.cpp
In file included from src/quazip/zip.h:60:0,
from src/quazip/quazip.h:31,
from src/gui/mainwindow.cpp:37:
src/quazip/ioapi.h:40:43: : expected initializer before OF
typedef voidpf(ZCALLBACK *open_file_func) OF((voidpf opaque, voidpf
file, int mode));
^
src/quazip/ioapi.h:41:42: : expected initializer before OF
typedef uLong(ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf
stream, void* buf, uLong size));
^
src/quazip/ioapi.h:42:43: : expected initializer before OF
typedef uLong(ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf
stream, const void* buf, uLong size));
^
src/quazip/ioapi.h:43:42: : expected initializer before OF
typedef uLong(ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
^
src/quazip/ioapi.h:44:41: : expected initializer before OF
typedef int (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf
stream, uLong offset, int origin));
^
src/quazip/ioapi.h:45:42: : expected initializer before OF
typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
^
src/quazip/ioapi.h:46:46: : expected initializer before OF
typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque,
voidpf stream));
^
src/quazip/ioapi.h:50:5: : open_file_func does not name a type
open_file_func zopen_file;
^
src/quazip/ioapi.h:51:5: : read_file_func does not name a type
read_file_func zread_file;
^
src/quazip/ioapi.h:52:5: : write_file_func does not name a type
write_file_func zwrite_file;
^
src/quazip/ioapi.h:53:5: : tell_file_func does not name a type
tell_file_func ztell_file;
^
src/quazip/ioapi.h:54:5: : seek_file_func does not name a type
seek_file_func zseek_file;
^
src/quazip/ioapi.h:55:5: : close_file_func does not name a type
close_file_func zclose_file;
^
src/quazip/ioapi.h:56:5: : testerror_file_func does not name a type
testerror_file_func zerror_file;
^
src/quazip/ioapi.h:62:30: : expected initializer before OF
void fill_qiodevice_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
^
In file included from src/quazip/quazip.h:31:0,
from src/gui/mainwindow.cpp:37:
src/quazip/zip.h:121:32: : expected initializer before OF
extern zipFile ZEXPORT zipOpen OF((voidpf file, int append));
^
src/quazip/zip.h:141:33: : expected initializer before OF
extern zipFile ZEXPORT zipOpen2 OF((voidpf file,
^
src/quazip/zip.h:146:40: : expected initializer before OF
extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,
^
src/quazip/zip.h:170:41: : expected initializer before OF
extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file,
^
src/quazip/zip.h:186:41: : expected initializer before OF
extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file,
^
src/quazip/zip.h:211:40: : expected initializer before OF
extern int ZEXPORT zipWriteInFileInZip OF((zipFile file,
^
src/quazip/zip.h:218:38: : expected initializer before OF
extern int ZEXPORT zipCloseFileInZip OF((zipFile file));
^
src/quazip/zip.h:223:41: : expected initializer before OF
extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file,
^
src/quazip/zip.h:232:29: : expected initializer before OF
extern int ZEXPORT zipClose OF((zipFile file,
^
In file included from src/quazip/quazip.h:32:0,
from src/gui/mainwindow.cpp:37:
src/quazip/unzip.h:127:45: : expected initializer before OF
extern int ZEXPORT unzStringFileNameCompare OF((const char* fileName1,
^
src/quazip/unzip.h:140:32: : expected initializer before OF
extern unzFile ZEXPORT unzOpen OF((voidpf file));
^
src/quazip/unzip.h:151:33: : expected initializer before OF
extern unzFile ZEXPORT unzOpen2 OF((voidpf file,
^
src/quazip/unzip.h:158:29: : expected initializer before OF
extern int ZEXPORT unzClose OF((unzFile file));
^
src/quazip/unzip.h:165:37: : expected initializer before OF
extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
^
src/quazip/unzip.h:173:40: : expected initializer before OF
extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
^
src/quazip/unzip.h:186:37: : expected initializer before OF
extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
^
src/quazip/unzip.h:192:36: : expected initializer before OF
extern int ZEXPORT unzGoToNextFile OF((unzFile file));
^
src/quazip/unzip.h:199:34: : expected initializer before OF
extern int ZEXPORT unzLocateFile OF((unzFile file,
^
src/quazip/unzip.h:231:42: : expected initializer before OF
extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
^
src/quazip/unzip.h:257:39: : expected initializer before OF
extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
^
src/quazip/unzip.h:263:47: : expected initializer before OF
extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
^
src/quazip/unzip.h:271:40: : expected initializer before OF
extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
^
src/quazip/unzip.h:284:40: : expected initializer before OF
extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
^
src/quazip/unzip.h:299:40: : expected initializer before OF
extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
^
src/quazip/unzip.h:305:39: : expected initializer before OF
extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
^
src/quazip/unzip.h:319:32: : expected initializer before OF
extern z_off_t ZEXPORT unztell OF((unzFile file));
^
src/quazip/unzip.h:324:27: : expected initializer before OF
extern int ZEXPORT unzeof OF((unzFile file));
^
src/quazip/unzip.h:329:42: : expected initializer before OF
extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
^
make: *** [obj_rel/mainwindow.o] Error 1


Regards,
Christos Gitsis

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
Chessx-users mailing list
Chessx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/chessx-users