Results 1 to 3 of 3

Thread: Linux -> Windows port issue (signals)

  1. #1

    Default Linux -> Windows port issue (signals)

    Hello,

    I'm having an issue porting one of my applications to Windows, I'm using Qt 4.5.2 OSE combined with VS2008. The problem is none of the signals/slots seem to work. I get this:
    Object::connect: No such signal QAction::activated() in d:\projects\cc\qteditor\
    ui_mainwindow.h:100
    Object::connect: (sender name: 'actionQuit')
    Object::connect: (receiver name: 'MainWindow')
    Object::connect: No such signal QAction::activated() in .\window.cpp:22
    Object::connect: (sender name: 'actionNew')
    Object::connect: (receiver name: 'MainWindow')
    Object::connect: No such signal QAction::activated() in .\window.cpp:23
    Object::connect: (sender name: 'actionOpen')
    Object::connect: (receiver name: 'MainWindow')
    Object::connect: No such signal QAction::activated() in .\window.cpp:24
    Object::connect: (sender name: 'actionSave')
    Object::connect: (receiver name: 'MainWindow')
    Object::connect: No such signal QAction::activated() in .\window.cpp:25
    Object::connect: (sender name: 'actionSave_as')
    Object::connect: (receiver name: 'MainWindow')
    Object::connect: No such signal QAction::activated() in .\window.cpp:26
    Object::connect: (sender name: 'actionAbout')
    Object::connect: (receiver name: 'MainWindow')
    This is especially maddening since the application builds fine in Windows, builds and runs fine -- it does not have this issue -- in Linux.

    Here is the buildlog
    "C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" -f Makefile.Debug
    c:\Qt\2009.03\qt\bin\uic.exe mainwindow.ui -o ui_mainwindow.h
    C:\Qt\2009.03\qt\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"c:\Qt\2009.03\qt\include\QtCore" -I"c:\Qt\2009.03\qt\include\QtGui" -I"c:\Qt\2009.03\qt\include" -I"c:\SDL-1.2.13\include" -I"." -I"c:\Qt\2009.03\qt\include\ActiveQt" -I"debug" -I"." -I"c:\Qt\2009.03\qt\mkspecs\default" -D_MSC_VER=1500 -DWIN32 mapviewer.h -o debug\moc_mapviewer.cpp
    C:\Qt\2009.03\qt\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"c:\Qt\2009.03\qt\include\QtCore" -I"c:\Qt\2009.03\qt\include\QtGui" -I"c:\Qt\2009.03\qt\include" -I"c:\SDL-1.2.13\include" -I"." -I"c:\Qt\2009.03\qt\include\ActiveQt" -I"debug" -I"." -I"c:\Qt\2009.03\qt\mkspecs\default" -D_MSC_VER=1500 -DWIN32 window.h -o debug\moc_window.cpp
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"c:\Qt\2009.03\qt\include\QtCore" -I"c:\Qt\2009.03\qt\include\QtGui" -I"c:\Qt\2009.03\qt\include" -I"c:\SDL-1.2.13\include" -I"." -I"c:\Qt\2009.03\qt\include\ActiveQt" -I"debug" -I"." -I"c:\Qt\2009.03\qt\mkspecs\default" -Fodebug\ @C:\Users\andrew\AppData\Local\Temp\nm7B37.tmp
    editor.cpp
    main.cpp
    mainwindow.cpp
    map.cpp
    .\map.cpp(26) : warning C4100: 'primitive' : unreferenced formal parameter
    .\map.cpp(56) : warning C4100: 'data' : unreferenced formal parameter
    .\map.cpp(61) : warning C4100: 'odata' : unreferenced formal parameter
    .\map.cpp(61) : warning C4100: 'nw' : unreferenced formal parameter
    .\map.cpp(60) : warning C4100: 'nv' : unreferenced formal parameter
    .\map.cpp(60) : warning C4100: 'v' : unreferenced formal parameter
    .\map.cpp(140) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
    C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(237) : see declaration of 'fopen'
    .\map.cpp(145) : warning C4189: 'w' : local variable is initialized but not referenced
    .\map.cpp(145) : warning C4189: 'h' : local variable is initialized but not referenced
    .\map.cpp(206) : warning C4189: 'breaker' : local variable is initialized but not referenced
    .\map.cpp(314) : warning C4189: 'h' : local variable is initialized but not referenced
    .\map.cpp(460) : warning C4018: '<' : signed/unsigned mismatch
    .\map.cpp(483) : warning C4018: '<' : signed/unsigned mismatch
    .\map.cpp(486) : warning C4018: '<' : signed/unsigned mismatch
    .\map.cpp(488) : warning C4018: '<' : signed/unsigned mismatch
    .\map.cpp(507) : warning C4018: '<' : signed/unsigned mismatch
    .\map.cpp(533) : warning C4018: '<' : signed/unsigned mismatch
    .\map.cpp(481) : warning C4189: 'continous' : local variable is initialized but not referenced
    .\map.cpp(482) : warning C4189: 'distance' : local variable is initialized but not referenced
    mapviewer.cpp
    .\mapviewer.cpp(163) : warning C4100: 'e' : unreferenced formal parameter
    .\mapviewer.cpp(320) : warning C4018: '<' : signed/unsigned mismatch
    .\mapviewer.cpp(323) : warning C4018: '<' : signed/unsigned mismatch
    .\mapviewer.cpp(340) : warning C4018: '<' : signed/unsigned mismatch
    .\mapviewer.cpp(343) : warning C4018: '<' : signed/unsigned mismatch
    .\mapviewer.cpp(347) : warning C4018: '<' : signed/unsigned mismatch
    surface.cpp
    window.cpp
    Generating Code...
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"c:\Qt\2009.03\qt\include\QtCore" -I"c:\Qt\2009.03\qt\include\QtGui" -I"c:\Qt\2009.03\qt\include" -I"c:\SDL-1.2.13\include" -I"." -I"c:\Qt\2009.03\qt\include\ActiveQt" -I"debug" -I"." -I"c:\Qt\2009.03\qt\mkspecs\default" -Fodebug\ @C:\Users\andrew\AppData\Local\Temp\nm90BA.tmp
    moc_mapviewer.cpp
    moc_window.cpp
    Generating Code...
    link /LIBPATH:"c:\Qt\2009.03\qt\lib" /NOLOGO /DEBUG /MANIFEST /MANIFESTFILE:"debug\qteditor.intermediate.manifest " /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /OUT:debug\qteditor.exe @C:\Users\andrew\AppData\Local\Temp\nm9760.tmp
    MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
    mt.exe -nologo -manifest "debug\qteditor.intermediate.manifest" -outputresource:debug\qteditor.exe;1
    moc, uic, ... seem to be running correctly.

    Here is the offending code.
    connect(actionNew, SIGNAL(activated()), this, SLOT(reset()));
    connect(actionOpen, SIGNAL(activated()), this, SLOT(open()));
    connect(actionSave, SIGNAL(activated()), this, SLOT(save()));
    connect(actionSave_as, SIGNAL(activated()), this, SLOT(saveas()));
    connect(actionAbout, SIGNAL(activated()), this, SLOT(about()));
    that's it. I'm at a loss as to why this works in Linux but not in Windows.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Linux -> Windows port issue (signals)

    It's probably because you don't have qt3 support at your windows machine. activated() is deprecated, use triggered() instead.

  3. #3

    Default Re: Linux -> Windows port issue (signals)

    Yeah, that was it. Thank you. :-) I had no idea it was deprecated.

Similar Threads

  1. Replies: 2
    Last Post: 22nd July 2009, 21:16
  2. Deployment Procedure On Windows On Linux and Windows
    By Harshith J.V. in forum Installation and Deployment
    Replies: 4
    Last Post: 9th July 2009, 12:27
  3. Replies: 2
    Last Post: 4th June 2009, 17:09
  4. Replies: 5
    Last Post: 15th January 2009, 10:03
  5. Replies: 1
    Last Post: 28th October 2008, 17:29

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.