Results 1 to 6 of 6

Thread: problem with virtual function in a .h

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default problem with virtual function in a .h

    Hello,
    I attach you the class; It works now but I want understand where exactly is the origin of the problem...
    If I do the same thing inside a .cpp, the "inline" keyword isn't necessary; then, I don't understand the compiler message (.net) ("already defined in main.obj")
    Qt Code:
    1. error LNK2005: "public: virtual struct Tree::Node * __thiscall Tree::getRoot(void)const " (?getRoot@Tree@@UBEPAUNode@1@XZ) already defined in main.obj
    To copy to clipboard, switch view to plain text mode 

    Thanks
    Attached Files Attached Files
    Regards

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 14:22
  2. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  3. how to add static library into qmake
    By Namrata in forum Qt Tools
    Replies: 1
    Last Post: 20th November 2007, 17:33
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  5. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12:52

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
  •  
Qt is a trademark of The Qt Company.