Results 1 to 2 of 2

Thread: Building Debug QwtScaleDiv LNK 2005 error

  1. #1
    Join Date
    Jul 2011
    Location
    Belgium
    Posts
    24
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Question Building Debug QwtScaleDiv LNK 2005 error

    Hi!

    I have a strange issue at the moment:
    I've made a new class using QwtScaleDiv's function: upperBound() and lowerBound() for an active QwtPlot. When building in debug, I get the following error:

    1. Error 1 error LNK2005: "public: double __thiscall QwtScaleDiv::lowerBound(void)const " (?lowerBound@QwtScaleDiv@@QBENXZ) already defined in overlayView.obj qwtd5.lib
    2. Error 2 error LNK2005: "public: double __thiscall QwtScaleDiv::upperBound(void)const " (?upperBound@QwtScaleDiv@@QBENXZ) already defined in overlayView.obj qwtd5.lib


    Now the thing is, the linker error is referring to the overlayView object whilest this object already excist for a long time and never has given this problem. Now when I try to use in my new class the QwtScaleDiv::lowerbound() and uperbound(), I recieve this linker error. When I remove the code usiing QwtScaleDiv from this new class, the error is gone...

    I really do not have a goddamn clue! Any ideas?

    Greetings,
    Robin

  2. #2
    Join Date
    Jul 2011
    Location
    Belgium
    Posts
    24
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Building Debug QwtScaleDiv LNK 2005 error

    Solved the issue. To many including's off the same header file was the problem. For some reason, the Visual Studio compiler couldn't do it. So I made some cross references to get the right information. Topic can be closed!

Similar Threads

  1. An error in QwtScaleDiv::invert
    By alex_sh in forum Qwt
    Replies: 3
    Last Post: 12th January 2012, 13:25
  2. Qt Visual studio 2005 NMake- How to Debug the Code
    By santhoshpatil in forum Newbie
    Replies: 1
    Last Post: 16th November 2011, 07:36
  3. Building a static application using MS Visual C++ 2005
    By hunsrus in forum Installation and Deployment
    Replies: 1
    Last Post: 25th July 2008, 18:16
  4. Building debug version under VS2008
    By KenW in forum Installation and Deployment
    Replies: 1
    Last Post: 2nd May 2008, 19:09
  5. Qt 4 commercial with Visual C++ 2005 Express Edition: Works half, debug fails
    By axeljaeger in forum Installation and Deployment
    Replies: 4
    Last Post: 5th July 2006, 05:38

Tags for this Thread

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.