Results 1 to 5 of 5

Thread: multiple defination

  1. #1
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question multiple defination

    Hi
    while im trying to compile my programm having 3 header file and 2 .cpp file im getting more that 100 lines of errors like below.
    i dont know what is going wrong.

    release\LetzterDSLocal.o(.text+0x310):LetzterDSLoc al.cpp: first defined here
    release\moc_TestLetzterDSLocal.o(.text+0x320):moc_ TestLetzterDSLocal.cpp: multiple definition of `Fi

    can any body help me?
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  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: multiple defination

    Check if you don't have multiple entries in the .pro file and post the whole first error you get.

  3. #3
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: multiple defination

    No i dont ve multiple entries in .pro file.

    .pro file contains the following

    ################################################## ####################
    # Automatically generated by qmake (2.01a) Wed Dec 12 09:18:52 2007
    ################################################## ####################

    INCLUDEPATH += ../include
    INCLUDEPATH += ../interface
    INLCUDEPATH += ../stubs
    DEFINES += FILESYSTEMSBFR_EXPORTS
    TEMPLATE = lib
    TARGET =
    DEPENDPATH += .
    INCLUDEPATH += .

    # Input
    HEADERS += TestLetzterDSLocal.h
    SOURCES += EBuLaException.cpp \
    LetzterDSLocal.cpp \
    StreamLocal.cpp \
    TestLetzterDSLocal.cpp \
    TestMain.cpp
    but im getting multilple defines to all the function, which i ve defined in stream file. nAnd its showing all the functions are defined in another file. but in actual its not defined .
    Last edited by jpn; 12th December 2007 at 09:55. Reason: reformatted to look better
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: multiple defination

    are u including ur files more than once ??
    Have u put the check -
    Qt Code:
    1. #ifdef _HEADER_NAMER_
    2. #define _HEADER_NAMER_
    3. ...
    4. ...
    5. #endif
    To copy to clipboard, switch view to plain text mode 

    in ur header files ?
    Last edited by jpn; 12th December 2007 at 09:55. Reason: missing [code] tags

  5. #5
    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: multiple defination

    Do you include any .cpp files in other ones using #include directive?

Similar Threads

  1. Object and multiple inheritance for interfaces
    By brcain in forum Qt Programming
    Replies: 8
    Last Post: 29th June 2021, 15:29
  2. mingw32-make : multiple target patterns error
    By tsemer in forum Installation and Deployment
    Replies: 2
    Last Post: 6th November 2007, 14:54
  3. Distributing multiple Qt applications?
    By gfunk in forum Qt Programming
    Replies: 5
    Last Post: 23rd August 2007, 17:41
  4. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23
  5. Replies: 25
    Last Post: 15th January 2006, 00:53

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.