Results 1 to 18 of 18

Thread: linking error while implementing QMotifStyle

  1. #1
    Join Date
    Jun 2008
    Posts
    15
    Qt products
    Qt3
    Platforms
    Windows

    Default linking error while implementing QMotifStyle

    Hi,
    I posted a question before.
    http://www.qtcentre.org/forum/f-qt-d...html#post72928

    Since it is really hard to change the button shape, so i would like to try a different style to see how the buttons look like.
    But after i changed QWindowsStyle to QMotifStyle, i got lots of linking errors. I posted a few errors
    cim error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QMotifStyle::QMotifStyle(bool)" (__imp_??0QMotifStyle@@QAE@_N@Z)
    cim error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall QMotifStyle::QMotifStyle(bool)" (__imp_??0QMotifStyle@@QAE@_N@Z)
    cim error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QMotifStyle::~QMotifStyle(void)" (__imp_??1QMotifStyle@@UAE@XZ)
    cim error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall QMotifStyle::qt_emit(int,struct QUObject *)" (__imp_?qt_emit@QMotifStyle@@UAE_NHPAUQUObject@@@Z )
    cim error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual bool __thiscall QMotifStyle::qt_invoke(int,struct QUObject *)" (__imp_?qt_invoke@QMotifStyle@@UAE_NHPAUQUObject@@ @Z)


    .Could anyone please tell me what to do to fix these errors.

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: linking error while implementing QMotifStyle

    Where did you change QWindowsStyle to QMotifStyle?

  3. #3
    Join Date
    Jun 2008
    Posts
    15
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: linking error while implementing QMotifStyle

    Quote Originally Posted by wysota View Post
    Where did you change QWindowsStyle to QMotifStyle?
    I changed all the appearances of QWindowsStyle to QMotifStyle in the file myStyle.cpp which was attached in my previous post. Here is the link
    http://www.qtcentre.org/forum/f-qt-d...html#post72928

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: linking error while implementing QMotifStyle

    What does
    Qt Code:
    1. qDebug() << QStyleFactory::keys();
    To copy to clipboard, switch view to plain text mode 
    output?
    J-P Nurmi

  5. #5
    Join Date
    Jun 2008
    Posts
    15
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: linking error while implementing QMotifStyle

    Quote Originally Posted by jpn View Post
    What does
    Qt Code:
    1. qDebug() << QStyleFactory::keys();
    To copy to clipboard, switch view to plain text mode 
    output?
    Hi,
    Thank you for the reply. i put this line qDebug() << QStyleFactory::keys(); in my code, it gives error C2660: 'qDebug' : function does not take 0 arguments.
    After i changed the code to qDebug(0) << QStyleFactory::keys(); , it gives another error
    error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'void' (or there is no acceptable conversion).
    could you please tell me how to fix the errors?

  6. #6
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: linking error while implementing QMotifStyle

    Try including the header:
    Qt Code:
    1. #include <QtDebug>
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  7. #7
    Join Date
    Jun 2008
    Posts
    15
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: linking error while implementing QMotifStyle

    Quote Originally Posted by jpn View Post
    Try including the header:
    Qt Code:
    1. #include <QtDebug>
    To copy to clipboard, switch view to plain text mode 
    Hi,
    I am using qt3.3.5, is QtDebug available in this version?
    Do you what other styles available in this version?
    Thanks

  8. #8
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: linking error while implementing QMotifStyle

    Quote Originally Posted by lzha022 View Post
    I am using qt3.3.5, is QtDebug available in this version?
    Sorry, I missed that.

    Do you what other styles available in this version?
    That's what I'm trying to get outputted.

    Anyway, QStyleFactory::keys() exists in Qt 3 too, just print each key by hand. It will print all available styles. Perhaps you don't have such style compiled in your library...
    J-P Nurmi

  9. #9
    Join Date
    Jun 2008
    Posts
    15
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: linking error while implementing QMotifStyle

    Hi ,
    Here is the output i get. So this means i do have Motif style. I just want to try a different style other than windows to see how it looks like. What other style do you recommend?

    MotifPlus
    Platinum
    Motif
    SGI
    CDE
    Windows

    Thanks

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: linking error while implementing QMotifStyle

    To see how the application looks like with another style, you don't have to recompile your code. Simply execute your application with a "-style motif" switch.

  11. #11
    Join Date
    Jun 2008
    Posts
    15
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: linking error while implementing QMotifStyle

    Quote Originally Posted by wysota View Post
    To see how the application looks like with another style, you don't have to recompile your code. Simply execute your application with a "-style motif" switch.
    Could you please tell me how to swith that? -Sorry i am not very familiar with QT, and i am using QT with .NET
    Will it switch motif on even if i have applied myStyle which implemented from WindowsStyle?

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: linking error while implementing QMotifStyle

    It has nothing to do with Qt or .NET or whatever else framework you might be using I meant you have to run your application with a "-style motif" parameter passed from within a shortcut or the command line.

  13. #13
    Join Date
    Jun 2008
    Posts
    15
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: linking error while implementing QMotifStyle

    Quote Originally Posted by wysota View Post
    It has nothing to do with Qt or .NET or whatever else framework you might be using I meant you have to run your application with a "-style motif" parameter passed from within a shortcut or the command line.
    But how should i pass the parameter '-style motif'?
    I can run my application by typing "myApp.exe", but when i typed "myApp.exe - style motif", nothing happened, the applicatin did not start.

  14. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: linking error while implementing QMotifStyle

    myApp.exe -style motif

    If the application doesn't start, you need to find out why - the problem is within the application itself (it might rely on some files which it can't find, etc.).

  15. #15
    Join Date
    Jun 2008
    Posts
    15
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: linking error while implementing QMotifStyle

    Quote Originally Posted by wysota View Post
    myApp.exe -style motif

    If the application doesn't start, you need to find out why - the problem is within the application itself (it might rely on some files which it can't find, etc.).
    The application starts if i type myApp.exe, but when i type myApp.exe -style motif, it does not.

  16. #16
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: linking error while implementing QMotifStyle

    Without knowing the code, it is hard to help you. You can try debugging and see if and why the application crashes.

  17. #17
    Join Date
    Jun 2008
    Posts
    15
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: linking error while implementing QMotifStyle

    Quote Originally Posted by wysota View Post
    Without knowing the code, it is hard to help you. You can try debugging and see if and why the application crashes.
    Thanks.
    back to the original question, do you know how to fix those linking errors?

  18. #18
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: linking error while implementing QMotifStyle

    Not without seeing any code and project file.

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.