CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    15

    Type Conflicts, same type in different projects.

    I have an app that has a plugin architecture using dlls.
    The main application has a type which is also used in the plugin dlls. So the source for this type needs to live in both projects. However if i add the source and try to compile i get.

    The type 'Player.data.Event' in "c:\........." conflicts with the imported type 'Player.data.Event' in "c:\blablabla" Using the type defined in bla bla bla etc...

    The type is identical in both cases. (Same file!)

    How am I best going about enabling this type to be used by both projects so they are able to both understand and pass objects between them?

    Many thanks.

    Ben

  2. #2
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Type Conflicts, same type in different projects.

    Why not make your class public to developers of a plug-in? That way they can use the class and do not need to duplicate it. You could also alias one of them or always use the fully qualified name.

    Code:
    using MyNamespace.Player = MyPlayer;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured