Re: Multiple Projects

Tech-Archive recommends: Speed Up your PC by fixing your registry



I could reproduce this with a test application and a control class.

the problem is that your reference (the dll or exe) contains an
implementation of your imported class, and the header file you include
contains another.

removing the reference from your project, or removing the header file
include statement solves this, because then only 1 implementation is found.

kind regards,
Bruno.


"yossis" <yossi.storch@xxxxxxxx> wrote in message
news:1136526045.956429.30140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I have a .Net solution that contains multiple projects of both Managed
> C++ and C#.
>
> There are references in one Managed C++ project's classes to classes in
> another Managed C++ project.
> i.e. Proj2::Class2 uses Proj1::Class1
>
> Proj2 has a reference entry for Proj1
>
> Each projects uses its own namespace, so Proj2::Class2.cpp has a #using
> namespace line referring to the namespace declared in the Proj1 classes
>
> I cannot get this scenario to compile. I get:
> "error C2512: 'Proj1::Class1' : no appropriate default constructor
> available"
>
> If I add #include "Class1.h" to Class2.cpp, then I alse get this:
> "error C2011: 'ManagedCppProj1::Class1' : 'class' type
> redefinition"
>
> I have tried the same scenario in a dummy solution with 2 simple
> Managed C++ projects and get the same results.
>
> Both projects are mixed mode and reference common unmanaged static C++
> libraries
>
> Any ideas??
>


.



Relevant Pages

  • Multiple Projects
    ... I have a .Net solution that contains multiple projects of both Managed ... Each projects uses its own namespace, ... I cannot get this scenario to compile. ... Both projects are mixed mode and reference common unmanaged static C++ ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Find a thread referance my name
    ... and check the thread name as you iterate through it). ... get the reference from. ... have thread-affinity, e.g. the Control class). ... > ClassName myClass = Thread.FindByName;> ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Dynamic cast with generics
    ... ....the problem is that I don't know that is the derived type used. ... The scenario is the following... ... I have a namespace with types and classes that defines a business model. ... but still there is need to reference the objects... ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Does project load DLL multiple times?
    ... You can't use a namespace. ... is there any waste of memory in the middle teir ... In other words, if I reference ... If memory is used by the Forms namespace in this scenario, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: VS2005 C#: User Testing
    ... The type or namespace name 'Drawing' does not exist in the namespace ... 'System' (are you missing an assembly reference?) ... Run it again, as now it should find it as a resource, and not be trying ... Studio altogether, not knew to programming. ...
    (microsoft.public.vstudio.general)