PDA

View Full Version : Problem with compiling QtService library from qt-solutions



code_err
30th January 2016, 22:02
https://github.com/qtproject/qt-solutions/tree/master/qtservice

I don't know if this is a good idea but I put here entire compiler log. I meet this problem again. Last time I've seen problem with BLOB when I was trying to include <windows.h> header and couldn't handle this. Now I'm trying to compile QtService library as dll and here you are: BLOB. Couldn't find anything related with this issue. Anybody knows what is happening and how fix it?


C:\Users\Ja\Desktop\qt-solutions-master\qtservice>qmake

C:\Users\Ja\Desktop\qt-solutions-master\qtservice>mingw32-make
cd buildlib\ && ( if not exist Makefile C:\Qt\Qt5.5.1\5.5\mingw492_32\bin\qmake.exe C:\Users\Ja\Desktop\qt-solutions-master\qtservice\buildlib\buildlib.pro -o Makefile ) && mingw32-make -f Makefile
mingw32-make[1]: Entering directory 'C:/Users/Ja/Desktop/qt-solutions-master/qtservice/buildlib'
mingw32-make -f Makefile.Release all
mingw32-make[2]: Entering directory 'C:/Users/Ja/Desktop/qt-solutions-master/qtservice/buildlib'
C:\Qt\Qt5.5.1\5.5\mingw492_32\bin\moc.exe -DUNICODE -DQT_QTSERVICE_EXPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -D__GNUC__ -DWIN32 -IC:/Qt/Qt5.5.1/5.5/mingw492_32/mkspecs/win32-g++ -IC:/Users/Ja/De
sktop/qt-solutions-master/qtservice/buildlib -IC:/Users/Ja/Desktop/qt-solutions-master/qtservice/src -IC:/Qt/Qt5.5.1/5.5/mingw492_32/include -IC:/Qt/Qt5.5.1/5.5/mingw492_32/include/QtGui -IC:/Qt/Qt5.5
.1/5.5/mingw492_32/include/QtANGLE -IC:/Qt/Qt5.5.1/5.5/mingw492_32/include/QtCore ..\src\qtservice.cpp -o release\qtservice.moc
g++ -c -pipe -fno-keep-inline-dllexport -O2 -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QTSERVICE_EXPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I..\src -IC:\Qt\Qt5.5.1\5.5\mingw4
92_32\include -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtGui -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtANGLE -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtCore -Irelease -IC:\Qt\Qt5.5.1\5.5\mingw492_32\mks
pecs\win32-g++ -o release\qtservice.o ..\src\qtservice.cpp
C:\Qt\Qt5.5.1\5.5\mingw492_32\bin\moc.exe -DUNICODE -DQT_QTSERVICE_EXPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -D__GNUC__ -DWIN32 -IC:/Qt/Qt5.5.1/5.5/mingw492_32/mkspecs/win32-g++ -IC:/Users/Ja/De
sktop/qt-solutions-master/qtservice/buildlib -IC:/Users/Ja/Desktop/qt-solutions-master/qtservice/src -IC:/Qt/Qt5.5.1/5.5/mingw492_32/include -IC:/Qt/Qt5.5.1/5.5/mingw492_32/include/QtGui -IC:/Qt/Qt5.5
.1/5.5/mingw492_32/include/QtANGLE -IC:/Qt/Qt5.5.1/5.5/mingw492_32/include/QtCore ..\src\qtservice_win.cpp -o release\qtservice_win.moc
g++ -c -pipe -fno-keep-inline-dllexport -O2 -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_QTSERVICE_EXPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I..\src -IC:\Qt\Qt5.5.1\5.5\mingw4
92_32\include -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtGui -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtANGLE -IC:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtCore -Irelease -IC:\Qt\Qt5.5.1\5.5\mingw492_32\mks
pecs\win32-g++ -o release\qtservice_win.o ..\src\qtservice_win.cpp
In file included from C:/Qt/Qt5.5.1/Tools/mingw492_32/i686-w64-mingw32/include/combaseapi.h:153:0,
from C:/Qt/Qt5.5.1/Tools/mingw492_32/i686-w64-mingw32/include/objbase.h:14,
from C:/Qt/Qt5.5.1/Tools/mingw492_32/i686-w64-mingw32/include/ole2.h:17,
from C:/Qt/Qt5.5.1/Tools/mingw492_32/i686-w64-mingw32/include/wtypes.h:12,
from C:/Qt/Qt5.5.1/Tools/mingw492_32/i686-w64-mingw32/include/winscard.h:10,
from C:/Qt/Qt5.5.1/Tools/mingw492_32/i686-w64-mingw32/include/windows.h:97,
from C:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtCore/qt_windows.h:63,
from ..\src\qtservice_win.cpp:52:
C:/Qt/Qt5.5.1/Tools/mingw492_32/i686-w64-mingw32/include/wtypesbase.h:386:16: error: using typedef-name 'BLOB' after 'struct'
typedef struct BLOB *LPBLOB;
^
C:/Qt/Qt5.5.1/Tools/mingw492_32/i686-w64-mingw32/include/wtypesbase.h:385:3: note: 'BLOB' has a previous declaration here
} BLOB;
^
C:/Qt/Qt5.5.1/Tools/mingw492_32/i686-w64-mingw32/include/wtypesbase.h:386:28: error: invalid type in declaration before ';' token
typedef struct BLOB *LPBLOB;
^
..\src\qtservice_win.cpp: In constructor 'HandlerThread::HandlerThread()':
..\src\qtservice_win.cpp:705:19: warning: 'HandlerThread::console' will be initialized after [-Wreorder]
bool success, console;
^
..\src\qtservice_win.cpp:698:50: warning: base 'QThread' [-Wreorder]
: success(true), console(false), QThread()
^
..\src\qtservice_win.cpp:697:5: warning: when initialized here [-Wreorder]
HandlerThread()
^
..\src\qtservice_win.cpp: At global scope:
..\src\qtservice_win.cpp:96:32: warning: 'pRegisterServiceProcess' defined but not used [-Wunused-variable]
static PRegisterServiceProcess pRegisterServiceProcess = 0;
^
Makefile.Release:504: recipe for target 'release/qtservice_win.o' failed
mingw32-make[2]: *** [release/qtservice_win.o] Error 1
mingw32-make[2]: Leaving directory 'C:/Users/Ja/Desktop/qt-solutions-master/qtservice/buildlib'
Makefile:38: recipe for target 'release-all' failed
mingw32-make[1]: *** [release-all] Error 2
mingw32-make[1]: Leaving directory 'C:/Users/Ja/Desktop/qt-solutions-master/qtservice/buildlib'
makefile:39: recipe for target 'sub-buildlib-make_first-ordered' failed
mingw32-make: *** [sub-buildlib-make_first-ordered] Error 2

C:\Users\Ja\Desktop\qt-solutions-master\qtservice>

d_stranz
30th January 2016, 23:51
I don't see -DWIN32 as one of the compiler options to g++. It is for moc. Maybe that's the cause?

code_err
31st January 2016, 01:31
I will test it but I'm not sure. Those were original files from project, I've just invoked configure -library, qmake, and mingw32-make. It would be strange if library were badly configured.

Added after 58 minutes:

I downloaded Qt for Visual Studio 2010 and it compilation works so the problem is not solved but bypassed.