Results 1 to 5 of 5

Thread: KHTMLView linker error:

  1. #1
    Join Date
    Feb 2006
    Location
    Enschede, NL, EU
    Posts
    19
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default KHTMLView linker error:

    I'm trying to use a KHTML View to show some html stuff in my app, but when try to compile it I get the following linker error...

    Qt Code:
    1. /home/shadow/project/kreator/src/genericcharmwidget.cpp:60: undefined reference to `KHTMLPart::KHTMLPart(QWidget*, char const*, QObject*, char const*, KHTMLPart::GUIProfile)'
    2. /home/shadow/project/kreator/src/genericcharmwidget.cpp:61: undefined reference to `KHTMLView::KHTMLView(KHTMLPart*, QWidget*, char const*)'
    To copy to clipboard, switch view to plain text mode 

    I've included the proper headers for both KTMLView and KHTMLPart and get no compiler errors.

    In my setupUI() function (called in constructor) I have:
    Qt Code:
    1. charmViewPart=new KHTMLPart(this);
    2. charmView=new KHTMLView(charmViewPart,this);
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KHTMLView linker error:

    Do you link your project with KDE libraries?

  3. #3
    Join Date
    Feb 2006
    Location
    Enschede, NL, EU
    Posts
    19
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: KHTMLView linker error:

    I have no trouble with any of the other KDE components I'm using (ie KApplication, loads of Kde widgets etc.)

    I'm using KDevelop 3.3.1

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KHTMLView linker error:

    Try adding "LIBS += -lkhtml" to your .pro file.

  5. The following user says thank you to jacek for this useful post:

    ReilenBlaeyze (1st March 2006)

  6. #5
    Join Date
    Feb 2006
    Location
    Enschede, NL, EU
    Posts
    19
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: KHTMLView linker error:

    That did it

    Didn't realize that khtml was it's own library.

Similar Threads

  1. nmake error during .pro compiling
    By mattia in forum Installation and Deployment
    Replies: 5
    Last Post: 18th June 2008, 11:15
  2. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 14:43
  3. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 13:57
  4. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 03:49
  5. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 13:19

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.