I have a C++ wrapper for an already built C# assembly. I can see in the file directory that the assembly is located at C:\Visual Studio 2008 MyProjects\DotNetDllForMet
aTrader4\D
ebug\CShar
pAssembly.
dll.
The code for CppStdcalInerfaceWrapper.d
ll (yes, wierd spelling) is still in development and quite small:
#include "stdafx.h"
#ifdef _MANAGED
#pragma managed(push, off)
#endif
#ifdef _MANAGED
#pragma managed(pop)
#endif
#using "CSharpAssembly.dll"
using namespace CSharpAssembly;
__declspec(dllexport) char* __stdcall Hello(char* name)
{
}
The problem is the line #using "CSharpAssembly.dll". The compiler/linker doesn't know where to find it.
I have tried the properties page for the CppStdcalInerfaceWrapper.d
ll.cpp project where
Configuration Properites > Linker > General > Additional Library Directories may be the place to put the answer, but I don't understand HOW to define the exact path C:\Visual Studio 2008 MyProjects\DotNetDllForMet
aTrader4\D
ebug\CShar
pAssembly.
dll.
Merely typing that text in the box does not solve the problem.
Start Free Trial