Menu

#39 win32 dcchat.cpp build failure

open
nobody
valknut (16)
5
2008-10-21
2008-10-21
No

Now that I have dclib working on WIN32, I've moved to valknut-qt4. Everything goes fine until this:

g++ -DHAVE_CONFIG_H -I. -I.. -I.. -Iui -I./ui -I -Wall -W -pedantic -Wno-long-long -Wundef -Wconversion -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -DVALKNUT_DATAPATH='"/mingw/valknut-qt4/share/valknut"' -g -O2 -Wall -W -pedantic -Wno-long-long -Wundef -Wconversion -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -I/qt/4.4.1/include -I/qt/4.4.1/include/QtCore -I/qt/4.4.1/include -I/qt/4.4.1/include/QtGui -I/qt/4.4.1/include -I/qt/4.4.1/include/QtNetwork -I/qt/4.4.1/include -I/qt/4.4.1/include/Qt3Support -DQT3_SUPPORT_WARNINGS -I/mingw/dclib/include -I/mingw/dclib/include/dclib-0.3 -DVALKNUT_DATAPATH='"/mingw/valknut-qt4/share/valknut"' -g -O2 -MT dcchat.o -MD -MP -MF .deps/dcchat.Tpo -c -o dcchat.o `test -f './dcchat.cpp' || echo './'`./dcchat.cpp
./dcchat.cpp: In member function `virtual bool DCChat::eventFilter(QObject*, QEvent*)':
c:/Util/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winuser.h:3914: error: too few arguments to function `LRESULT SendMessageA(HWND__*, UINT, WPARAM, LPARAM)'
./dcchat.cpp:285: error: at this point in file
./dcchat.cpp: In member function `void DCChat::slotSendMessage()':
c:/Util/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winuser.h:3914: error: too few arguments to function `LRESULT SendMessageA(HWND__*, UINT, WPARAM, LPARAM)'
./dcchat.cpp:1132: error: at this point in file
./dcchat.cpp: At global scope:
./dcchat.cpp:1611: error: no `void DCChat::SendMessageA(QString)' member function declared in class `DCChat'
./dcchat.cpp: In member function `bool DCChat::CheckForCommand()':
./dcchat.cpp:2069: error: cannot convert `QString' to `HWND__*' for argument `1' to `LRESULT SendMessageA(HWND__*, UINT, WPARAM, LPARAM)'
./dcchat.cpp:2206: error: cannot convert `QString' to `HWND__*' for argument `1' to `LRESULT SendMessageA(HWND__*, UINT, WPARAM, LPARAM)'
./dcchat.cpp:2221: error: cannot convert `QString' to `HWND__*' for argument `1' to `LRESULT SendMessageA(HWND__*, UINT, WPARAM, LPARAM)'
./dcchat.cpp:2381: error: cannot convert `QString' to `HWND__*' for argument `1' to `LRESULT SendMessageA(HWND__*, UINT, WPARAM, LPARAM)'
./dcchat.cpp:2491: error: cannot convert `QString' to `HWND__*' for argument `1' to `LRESULT SendMessageA(HWND__*, UINT, WPARAM, LPARAM)'
./dcchat.cpp:2508: error: `sleep' was not declared in this scope
./dcchat.cpp:2508: warning: unused variable 'sleep'
./dcchat.cpp:2685: error: cannot convert `QString' to `HWND__*' for argument `1' to `LRESULT SendMessageA(HWND__*, UINT, WPARAM, LPARAM)'
./dcchat.cpp:2744: error: cannot convert `QString' to `HWND__*' for argument `1' to `LRESULT SendMessageA(HWND__*, UINT, WPARAM, LPARAM)'
./dcchat.cpp: In member function `void DCChat::slotShellCommandFinished(bool, QString)':
./dcchat.cpp:2999: error: cannot convert `QString' to `HWND__*' for argument `1' to `LRESULT SendMessageA(HWND__*, UINT, WPARAM, LPARAM)'
make[4]: *** [dcchat.o] Error 1
make[4]: Leaving directory `/src/valknut/valknut'

I'm using the official MinGW QT windows binaries direct from Trolltech.

Discussion

  • Edward Sheldrake

    It's just a valknut function having the same name is Windows' SendMessage() plus sleep() not #ifdef'd to Sleep(), I've fixed those but may re-write all the external process usage so that there isn't any sleeping at all.

    Wine cannot run mingw bash, the win32 libxml2 binary is built with msvc so isn't compatible with mingw, plus QT don't make it clear what's in the Windows downloads, I guess the one with mingw also has some binaries and the other is just the source, so I haven't done much WIN32 work since getting dclib to compile.

     
  • Nobody/Anonymous

    Thanks for the fix. I'll try to help doing as much testing as possible for win32.

    My libxml2 was built w/ mingw, so it should be able to work.

    I've also put up a file list of where the official qt4-win binary installer places things. It's at <http://www.snaggledworks.com/temp/qt4-list.txt>. Hope it's useful

    For now, the build progresses quite far until it reaches dcusercommandeditor.cpp:

    g++ -DHAVE_CONFIG_H -I. -I.. -I.. -Iui -I./ui -I -Wall -W -pedantic -Wno-long-long -Wundef -Wconversion -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -DVALKNUT_DATAPATH='"/mingw/valknut-qt4/share/valknut"' -g -O2 -Wall -W -pedantic -Wno-long-long -Wundef -Wconversion -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -I/qt/4.4.1/include -I/qt/4.4.1/include/QtCore -I/qt/4.4.1/include -I/qt/4.4.1/include/QtGui -I/qt/4.4.1/include -I/qt/4.4.1/include/QtNetwork -I/qt/4.4.1/include -I/qt/4.4.1/include/Qt3Support -DQT3_SUPPORT_WARNINGS -I/mingw/dclib/include -I/mingw/dclib/include/dclib-0.3 -DVALKNUT_DATAPATH='"/mingw/valknut-qt4/share/valknut"' -g -O2 -MT dcusercommandeditor.o -MD -MP -MF .deps/dcusercommandeditor.Tpo -c -o dcusercommandeditor.o `test -f './dcusercommandeditor.cpp' || echo './'`./dcusercommandeditor.cpp
    ./dcusercommandeditor.cpp:170: error: no `DC_UserMenuCommand* DCUserCommandEditor::GetObjectA()' member function declared in class `DCUserCommandEditor'
    make[4]: *** [dcusercommandeditor.o] Error 1
    make[4]: Leaving directory `/src/valknut/valknut'

     
  • Edward Sheldrake

    It's just another conflict with a Windows function - GetObject. More renaming done.

    If you get to linking you may need to add "-lqtmain" to the linker flags.

     
  • Hanspeter Niederstrasser

    kdesignal.h that I used

     
  • Hanspeter Niederstrasser

    This one seems a bit more problematic. mingw's include/signal.h doesn't have SIGCONT. The kdewin32 project does have one, though <http://api.kde.org/kdesupport-api/kdesupport-apidocs/kdewin32/html/mingw_2signal_8h-source.html>. I took that file, placed it as include/kdesignal.h and included that from main.cpp and main.o built after I commented out the KDEWIN32_EXPORT lines and line 368 in main.cpp ( which uses kill() ) because I did not know how to fix the (not unexpected) type errors that resulted. I didn't try going any further though after main.o 'built'.

    g++ -DHAVE_CONFIG_H -I. -I.. -I.. -Iui -I./ui -I -Wall -W -pedantic -Wno-long-long -Wundef -Wconversion -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -DVALKNUT_DATAPATH='"/mingw/valknut-qt4/share/valknut"' -g -O2 -Wall -W -pedantic -Wno-long-long -Wundef -Wconversion -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_REENTRANT -I/qt/4.4.1/include -I/qt/4.4.1/include/QtCore -I/qt/4.4.1/include -I/qt/4.4.1/include/QtGui -I/qt/4.4.1/include -I/qt/4.4.1/include/QtNetwork -I/qt/4.4.1/include -I/qt/4.4.1/include/Qt3Support -DQT3_SUPPORT_WARNINGS -I/mingw/dclib/include -I/mingw/dclib/include/dclib-0.3 -DVALKNUT_DATAPATH='"/mingw/valknut-qt4/share/valknut"' -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o `test -f './main.cpp' || echo './'`./main.cpp
    ./main.cpp: In function `int main(int, char**)':
    ./main.cpp:364: error: `SIGCONT' was not declared in this scope
    ./main.cpp:364: error: `kill' was not declared in this scope
    ./main.cpp:364: warning: unused variable 'SIGCONT'
    ./main.cpp:364: warning: unused variable 'kill'
    make[4]: *** [main.o] Error 1
    make[4]: Leaving directory `/src/valknut/valknut'

    File Added: kdesignal.h

     
  • Edward Sheldrake

    valknut doesn't do any signal handling on WIN32 but not all the code is #ifdef'd, and sending SIGCONT to the crashed process doesn't appear to be necessary anyway, so I've removed it.

     

Log in to post a comment.