Re: Duplicate definition on Interface declaration





"Mike D Sutton" wrote:

In my application I have an interface class which is implemented in a half
dozen other classes. Occasionally (and every time, at the moment) when I
start the application in the IDE, it does the JIT compile and then
highlights
one declaration in the Interface class (for a routine called Init), with
the
error "Duplicate definition". I've checked the declaration, and it is
correct, and it is consistent with the implementation in the other classes
that implement this interface, and there is no other Init routine in the
Interface class. The help file indicates that this is a problem with
duplicate compiler constants (#Const), but I do not have any of these in
my
application. Sometimes it will start without this error, and it always
builds without error. I've searched the Microsoft site, the MSDN site,
and
the Internet in general, and can't find any related information. Does
anyone
have any insights into this problem? Any help would be most appreciated.
And if there is a better discussion board to post this on, please let me
know.

Does one of your classes that implement the interface also expose a local
Init() method perhaps?
Are there any other variables / constants / objects / structures /
enumerators etc with the name "Init" in your project?
Do you have an "Init" conditional compile argument set (Project -> [Project
name] Properties -> Make -> Conditional compilation arguments)?

Mike


- Microsoft Visual Basic MVP -
E-Mail: EDais@xxxxxxxx
WWW: Http://EDais.mvps.org/


I've checked and none of the classes that implement this interface have a
local Init routine. There are no conditional compile arguments named "Init".
There is only one conditional compile argument in one project of the
application, and that is named "STARTUP_MODE". I don't believe there are any
variables / constants / objects / structures / enums / etc. named Init, but
it will take a while to search all the projects in the entire application.
There are some local routines named Init, in classes that do not implement
this interface, but there are classes that don't implement this interface
that also have local routines named Load and Save which are on this interface
too, but have never generated this "Duplicate definition" error.

And now, to make matters even more challenging, I'm getting this Duplicate
definition error when I try to display some forms and/or controls in the IDE
by either double clicking on them, or right clicking and selecting "View
Object". Not all forms and controls, just some of them. I'm going to check
all the references in all the projects, just to make sure one of those hasn't
gotten corrupted.

The other members of my team are also occasionally getting this error, but
we cannot define any rhyme or reason to it.

Marc
.



Relevant Pages

  • Re: creaping coupling......
    ... but it is a more strict contract than required. ... "I am capable of implementing things via interface XYZ i.e. ... consider specifically that we compile, deploy and then we delete a method to ... IWriteable pipe = new Pipe; ...
    (comp.object)
  • Re: ActiveX.exe question
    ... > the public interface still need registered in order to use them. ... Compile AXExe.exe against a Share on the TestPC ... Open a Standard-Exe-Project on your DevelopPC and name it AXTest ... Compile AXTest.exe against the Share on the TestPC ...
    (microsoft.public.vb.general.discussion)
  • Re: RAD vs. performance
    ... thus they fulfull the number interface and can be used interchangeably. ... I'm not about to ditch statically typed languages ... Because you need whole-program optimisation for a start. ... The benefits of static typing come at compile time. ...
    (comp.lang.misc)
  • Re: Is Direct3D a rip-off of OpenGL?
    ... People who think that a method change in a NEW INTERFACE in DirectX really ... Moving to use a NEW INTERFACE, ... > ago simply isn't going to compile with the latest SDK, ...
    (comp.graphics.api.opengl)
  • Re: Abstract Data Types - Separating Interface from Implementation
    ... >>You seem to be confusing implementation code and client code. ... I don't define any of the functions yet, I just declare them and compile ... Each such file defines an *interface*. ...
    (comp.lang.cpp)