Results 1 to 20 of 26

Thread: Function previously defined in created file?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Jan 2006
    Posts
    21
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Function previously defined in created file?

    As I can guess from the .pro file, you have implementation and declaration in the header file?
    Yes. Is this not correct? Here, I have cleaned all make- and qmake-generated files, moved my implementation to seperate .cxx files, and tried to build again.
    Qt Code:
    1. ($:app4lin) make
    2. g++ -c -pipe -Wall -W -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -DQT_NO_DEBUG -I/usr/lib/qt-3.3/mkspecs/default -I. -I. -I/usr/lib/qt-3.3/include -o app4lin.o app4lin.cxx
    3. ./qtrackingbutton.cxx:20: warning: unused parameter ‘e’
    4. g++ -c -pipe -Wall -W -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -DQT_NO_DEBUG -I/usr/lib/qt-3.3/mkspecs/default -I. -I. -I/usr/lib/qt-3.3/include -o qdoublebutton.o qdoublebutton.cxx
    5. qtrackingbutton.cxx:20: warning: unused parameter ‘e’
    6. g++ -c -pipe -Wall -W -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -DQT_NO_DEBUG -I/usr/lib/qt-3.3/mkspecs/default -I. -I. -I/usr/lib/qt-3.3/include -o qtrackingbutton.o qtrackingbutton.cxx
    7. qtrackingbutton.cxx:20: warning: unused parameter ‘e’
    8. /usr/lib/qt-3.3/bin/moc qdoublebutton.h -o moc_qdoublebutton.cpp
    9. g++ -c -pipe -Wall -W -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -DQT_NO_DEBUG -I/usr/lib/qt-3.3/mkspecs/default -I. -I. -I/usr/lib/qt-3.3/include -o moc_qdoublebutton.o moc_qdoublebutton.cpp
    10. qtrackingbutton.cxx:20: warning: unused parameter ‘e’
    11. /usr/lib/qt-3.3/bin/moc qtrackingbutton.h -o moc_qtrackingbutton.cpp
    12. g++ -c -pipe -Wall -W -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -DQT_NO_DEBUG -I/usr/lib/qt-3.3/mkspecs/default -I. -I. -I/usr/lib/qt-3.3/include -o moc_qtrackingbutton.o moc_qtrackingbutton.cpp
    13. g++ -Wl,-rpath,/usr/lib/qt-3.3/lib -o app4lin app4lin.o qdoublebutton.o qtrackingbutton.o moc_qdoublebutton.o moc_qtrackingbutton.o -L/usr/lib/qt-3.3/lib -L/usr/X11R6/lib -lqt -lXext -lX11 -lm
    14. qdoublebutton.o(.text+0x0): In function `QTrackingButton::QTrackingButton(QString, QWidget*, char*)':
    15. /usr/lib/qt-3.3/include/qglist.h:150: multiple definition of `QTrackingButton::QTrackingButton(QString, QWidget*, char*)'
    16. app4lin.o(.text+0x0):/usr/lib/qt-3.3/include/qglist.h:150: first defined here
    17. qdoublebutton.o(.text+0x3a): In function `QTrackingButton::QTrackingButton(QString, QWidget*, char*)':
    18. /home/twey/devel/cpp/qt/hts/app4lin/qtrackingbutton.cxx:16: multiple definition of `QTrackingButton::QTrackingButton(QString, QWidget*, char*)'
    19. app4lin.o(.text+0x3a):./qtrackingbutton.cxx:16: first defined here
    20. qdoublebutton.o(.text+0x74): In function `QTrackingButton::mouseMoved()':
    21. /home/twey/devel/cpp/qt/hts/app4lin/qtrackingbutton.cxx:25: multiple definition of `QTrackingButton::mouseMoved()'
    22. app4lin.o(.text+0x74):./qtrackingbutton.cxx:25: first defined here
    23. qdoublebutton.o(.text+0x7a): In function `QTrackingButton::mouseMoveEvent(QMouseEvent*)':
    24. /home/twey/devel/cpp/qt/hts/app4lin/qtrackingbutton.cxx:20: multiple definition of `QTrackingButton::mouseMoveEvent(QMouseEvent*)'
    25. app4lin.o(.text+0x7a):./qtrackingbutton.cxx:20: first defined here
    26. qdoublebutton.o(.text+0x80): In function `QDoubleButton::QDoubleButton(QWidget*, char*)':
    27. /home/twey/devel/cpp/qt/hts/app4lin/qdoublebutton.cxx:3: multiple definition of `QDoubleButton::QDoubleButton(QWidget*, char*)'
    28. app4lin.o(.text+0x80):./qdoublebutton.cxx:3: first defined here
    29. qdoublebutton.o(.text+0x266): In function `QDoubleButton::QDoubleButton(QWidget*, char*)':
    30. /home/twey/devel/cpp/qt/hts/app4lin/qdoublebutton.cxx:3: multiple definition of `QDoubleButton::QDoubleButton(QWidget*, char*)'
    31. app4lin.o(.text+0x266):./qdoublebutton.cxx:3: first defined here
    32. qdoublebutton.o(.text+0x44a): In function `QDoubleButton::clicked()':
    33. /home/twey/devel/cpp/qt/hts/app4lin/qdoublebutton.cxx:16: multiple definition of `QDoubleButton::clicked()'
    34. app4lin.o(.text+0x4ee):./qdoublebutton.cxx:16: first defined here
    35. qdoublebutton.o(.text+0x540): In function `QDoubleButton::moused()':
    36. /home/twey/devel/cpp/qt/hts/app4lin/qdoublebutton.cxx:21: multiple definition of `QDoubleButton::moused()'
    37. app4lin.o(.text+0x5e4):./qdoublebutton.cxx:21: first defined here
    38. qtrackingbutton.o(.text+0x0): In function `QTrackingButton::QTrackingButton(QString, QWidget*, char*)':
    39. /usr/lib/qt-3.3/include/qglist.h:150: multiple definition of `QTrackingButton::QTrackingButton(QString, QWidget*, char*)'
    40. app4lin.o(.text+0x0):app4lin.cxx: first defined here
    41. qtrackingbutton.o(.text+0x3a): In function `QTrackingButton::QTrackingButton(QString, QWidget*, char*)':
    42. /home/twey/devel/cpp/qt/hts/app4lin/qtrackingbutton.cxx:16: multiple definition of `QTrackingButton::QTrackingButton(QString, QWidget*, char*)'
    43. app4lin.o(.text+0x3a):./qtrackingbutton.cxx:16: first defined here
    44. qtrackingbutton.o(.text+0x74): In function `QTrackingButton::mouseMoved()':
    45. /home/twey/devel/cpp/qt/hts/app4lin/qtrackingbutton.cxx:25: multiple definition of `QTrackingButton::mouseMoved()'
    46. app4lin.o(.text+0x74):./qtrackingbutton.cxx:25: first defined here
    47. qtrackingbutton.o(.text+0x7a): In function `QTrackingButton::mouseMoveEvent(QMouseEvent*)':
    48. /home/twey/devel/cpp/qt/hts/app4lin/qtrackingbutton.cxx:20: multiple definition of `QTrackingButton::mouseMoveEvent(QMouseEvent*)'
    49. app4lin.o(.text+0x7a):./qtrackingbutton.cxx:20: first defined here
    50. moc_qdoublebutton.o(.text+0x0): In function `QTrackingButton::QTrackingButton(QString, QWidget*, char*)':
    51. /usr/lib/qt-3.3/include/qglist.h:150: multiple definition of `QTrackingButton::QTrackingButton(QString, QWidget*, char*)'
    52. app4lin.o(.text+0x0):app4lin.cxx: first defined here
    53. moc_qdoublebutton.o(.text+0x3a): In function `QTrackingButton::QTrackingButton(QString, QWidget*, char*)':
    54. /home/twey/devel/cpp/qt/hts/app4lin/qtrackingbutton.cxx:16: multiple definition of `QTrackingButton::QTrackingButton(QString, QWidget*, char*)'
    55. app4lin.o(.text+0x3a):./qtrackingbutton.cxx:16: first defined here
    56. moc_qdoublebutton.o(.text+0x74): In function `QTrackingButton::mouseMoved()':
    57. /home/twey/devel/cpp/qt/hts/app4lin/qtrackingbutton.cxx:25: multiple definition of `QTrackingButton::mouseMoved()'
    58. app4lin.o(.text+0x74):./qtrackingbutton.cxx:25: first defined here
    59. moc_qdoublebutton.o(.text+0x7a): In function `QTrackingButton::mouseMoveEvent(QMouseEvent*)':
    60. /home/twey/devel/cpp/qt/hts/app4lin/qtrackingbutton.cxx:20: multiple definition of `QTrackingButton::mouseMoveEvent(QMouseEvent*)'
    61. app4lin.o(.text+0x7a):./qtrackingbutton.cxx:20: first defined here
    62. moc_qtrackingbutton.o(.text+0x286): In function `QTrackingButton::mouseMoved()':
    63. /home/twey/devel/cpp/qt/hts/app4lin/moc_qtrackingbutton.cpp:80: multiple definition of `QTrackingButton::mouseMoved()'
    64. app4lin.o(.text+0x74):./qtrackingbutton.cxx:25: first defined here
    65. /usr/bin/ld: Warning: size of symbol `QTrackingButton::mouseMoved()' changed from 5 in app4lin.o to 31 in moc_qtrackingbutton.o
    66. collect2: ld returned 1 exit status
    67. make: *** [app4lin] Error 1
    To copy to clipboard, switch view to plain text mode 
    Project file:
    ################################################## ####################
    # Automatically generated by qmake (1.07a) Sat Jan 14 12:22:56 2006
    ################################################## ####################

    TEMPLATE = app
    INCLUDEPATH += .

    # Input
    HEADERS += qdoublebutton.h qtrackingbutton.h
    SOURCES += app4lin.cxx qdoublebutton.cxx qtrackingbutton.cxx
    /EDIT: there really ought to be scrollbars on those [quote] boxes.
    Last edited by Twey; 14th January 2006 at 13:29. Reason: Used [code] tags instead of [quote].

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 14:22
  2. Regading Driver to connect Postgresql Database
    By dummystories in forum Installation and Deployment
    Replies: 38
    Last Post: 12th March 2009, 07:19
  3. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  4. how to add static library into qmake
    By Namrata in forum Qt Tools
    Replies: 1
    Last Post: 20th November 2007, 17:33
  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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.