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
    Posts
    313

    Resolved [RESOLVED] Use two DLL have same classes name

    Hello,

    The situation as following:

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

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

    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 3.4.3.3016 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.


    Solved:
    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)
    Code:
    extern alias MyAliases;
    - Add this code which Emgu.CV is my dll reference name
    Code:
    using MyAliases.Emgu.CV;
    Every time I have to call a function from the DLL, I had to do this way

    For example,
    Code:
    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