[SOLVED] Problems with MOC file and multiple definitions



  • Hi guys,

    I developed some functions in Eclipse and they work wonders. Now, I need to use then inside an user interface created in QT.

    The problem is, when I try to use them inside QT, I get multiple definition error. Something like:

    @
    /home/bahamut/Qt/BasicProto2-build-desktop-Qt_4_8_1_in_PATH__System__Release/moc_measures.cpp:-1: error: multiple definition of `interface::Measures::volumeIntegSimpson()'
    @

    My functions are inside an .hpp file, as in the following example:

    @
    #ifndef MODULE__HPP__
    #define MODULE__HPP__

    namespace module1 {
    class Module {
    protected:
    int x, y;
    .
    .
    .
    public:
    double volumeIntegSimpson();
    .
    .
    .
    };
    }
    @

    I found some info around the forum about moc files, but none of them really apply to my problem, since I am not defining any signal/ slot nor including any moc file to my main program.

    Any help would be appreciated.



  • Anyone here? Please?!



  • Just for the records, in case someone else faces this problem:
    .
    http://stackoverflow.com/questions/6082318/how-to-find-the-multiple-definitions-of-a-function


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.