Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Problems with MOC file and multiple definitions
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Problems with MOC file and multiple definitions

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 12.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ArchGabe
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      ArchGabe
      wrote on last edited by
      #2

      Anyone here? Please?!

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ArchGabe
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved