Error C2653. Type or namespace name not found (link present) in C ++

I tried to pass the dll vb.net link to a C ++ project. I managed to add the link successfully, but I cannot use it in my code.

I have the following link:

enter image description here

I am trying to use it like:

Configuration::MyClass::MyFunction()

I got the following error:

error C2653: 'Configuration' : is not a class or namespace name

What am I doing wrong? Do I need to add a header file?

+4
source share
3 answers

Make sure you make the assembly in the COM subsystem with this property 'ComVisible'. Then you must register the assembly in order to open it on COM 'subscribers'.

Only then can you use the assembly namespace from your C ++ code.

DLL Visual ++ .

0

<ComVisible(True)> _
<Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")> _
<ClassInterface(ClassInterfaceType.None)> _

. , . http://social.msdn.microsoft.com/Forums/en-US/3f30b414-2ea3-4a54-b4cb-24e48fdfda3e/calling-vbnet-dll-from-c?forum=vbgeneral

+2

, , Visual Studio.

On the other hand, another answer suggests that this may be a dependency problem. In addition, you may have a class with the same name that is defined twice in different libraries.

In any case, consider re-checking all the dependencies and installing Visual Studio.

Here is another answer regarding the topic.

UPD: check if you are trying to define a compound namespace that is illegal in C ++ .

0
source

All Articles