XPCom, C++ -- ld: duplicate symbol - Mozilla

This is a discussion on XPCom, C++ -- ld: duplicate symbol - Mozilla ; Hello! I'm working on an extension. I implemented it in c++ with the xpcom interface and my test-extension works fine. But the "real-project" implementation doesn't work. Now I have more then one .cpp files, but only the "main" file have ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: XPCom, C++ -- ld: duplicate symbol

  1. XPCom, C++ -- ld: duplicate symbol

    Hello!

    I'm working on an extension. I implemented it in c++ with the xpcom
    interface and my test-extension works fine. But the "real-project"
    implementation doesn't work. Now I have more then one .cpp files, but
    only the "main" file have an idl-file. Should/Must I create for
    every .h/.cpp file an idl-file-Interface?

    My implementation idea was: the interface-cpp gets information from
    the ui and instances all other required objects.
    However, I get this error:

    ld: duplicate symbol EventViewData::EventViewData(nsString_external&,
    nsIDOMWindow*&, nsAString const&, nsAString const&)in
    mozReceiveModule.o and mozReceive.o

    Can anybody help me, or need you more information?
    Best regards,

    Simon

  2. Re: XPCom, C++ -- ld: duplicate symbol

    On 13 Okt., 17:06, Simon wrote:
    > Hello!
    >
    > I'm working on an extension. I implemented it in c++ with the xpcom
    > interface and my test-extension works fine. But the "real-project"
    > implementation doesn't work. Now I have more then one .cpp files, but
    > only the "main" file have an idl-file. Should/Must I create for
    > every .h/.cpp file an idl-file-Interface?
    >
    > My implementation idea was: the interface-cpp gets information from
    > the ui and instances all other required objects.
    > However, I get this error:
    >
    > ld: duplicate symbol EventViewData::EventViewData(nsString_external&,
    > nsIDOMWindow*&, nsAString const&, nsAString const&)in
    > mozReceiveModule.o and mozReceive.o
    >
    > Can anybody help me, or need you more information?
    > Best regards,
    >
    > Simon


    It's done. It was my failure. I have included an .cpp file but it
    should be an .h file. Now it compiles. Thanks...

+ Reply to Thread