Results 1 to 1 of 1

Thread: [RESOLVED] Use two DLL have same classes name

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2010

    Resolved [RESOLVED] Use two DLL have same classes name


    The situation as following:

    - I have a project built using Emgu.CV DLL version

    - I have a class build using Emgu.CV DLL version

    One I added the class and the DLL to the project I got many errors like;
    - The type 'Emgu.CV.Structure.Bgr' exists in both 'Emgu.CV.dll' and 'Emgu.CV.World.dll'

    My attempts to solve the issue:
    1- Use the Aliases property for DLL, I didn't success to use it, I follow some explanation only but at the end doesn't work

    2- Convert the class to DLL and I wanted to embed the Emgu.CV DLL version in the DLL (my class) resources

    My attempts didn't success and I need to know which method I have to follow. Please advise me.

    Finally after some days, I solved this by using the Aliases property for DLL, and the steps as following,
    - I added the two DLL files to my project References
    - I changed the Aliases property for one of the DLL, I rename it to "MyAliases" you can put whatever name
    - I added this line to my behind code (I put it at the beginning before anything)
    extern alias MyAliases;
    - Add this code which Emgu.CV is my dll reference name
    using MyAliases.Emgu.CV;
    Every time I have to call a function from the DLL, I had to do this way

    For example,
    MyAliases.Emgu.CV.Image<MyAliases.Emgu.CV.Structure.Gray, Byte> normalizedMasterImage = new MyAliases.Emgu.CV.Image<MyAliases.Emgu.CV.Structure.Gray, Byte>(varImage);
    Which I called the function like this MyAliases.Emgu.CV.Image instead of writing Image
    Last edited by waleed_89; Mar 14th, 2019 at 03:28 PM.

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