views:

157

answers:

0

I'm running into a very weird behavior in a C++/CLI DLL that wraps some native code, so it can be accessed through .NET. This DLL wraps code from different native DLLs and defines namespaces to separate the wrappers for the different native modules. For example:

  • namespace Foo -> wraps code in Foo.dll (which is a native C++ DLL).
  • namespace Bar -> wraps code in Bar.dll (which is another native C++ DLL).

The problem that I'm running into is that the types in namespace Bar (for example) are not being resolved correctly. They are coming as types of a base class defined in Foo.

At the beginning, I thought it might be because some dependency might have been preventing Bar.dll to load, but that is not the case. Bar.dll is loading correctly. Furthermore, it is just this Bar namespace that has the problem. Classes in, let's say, namespace Zap, which of course wraps Zap.dll, are resolved correctly.

I'm wondering if someone has run into a similar problem or has an idea of what can be the cause.

Any help will be highly appreciated.