Advertisement

05.29.2008 at 08:55AM PDT, ID: 23441922
[x]
Attachment Details

How to define location of assembly in a Visual Studio C++ properties page

Asked by chaffinsjc in Microsoft Visual C++.Net, Microsoft Visual C#.Net

Tags:

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\DotNetDllForMetaTrader4\Debug\CSharpAssembly.dll.

The code for CppStdcalInerfaceWrapper.dll (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.dll.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\DotNetDllForMetaTrader4\Debug\CSharpAssembly.dll.

Merely typing that text in the box does not solve the problem.Start Free Trial
[+][-]05.29.2008 at 11:21AM PDT, ID: 21671866

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.29.2008 at 11:43AM PDT, ID: 21672066

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.29.2008 at 12:06PM PDT, ID: 21672318

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual C++.Net, Microsoft Visual C#.Net
Tags: fatal error C1107 could not find assembly 'CSharpAssembly.dll'
Sign Up Now!
Solution Provided By: evilrix
Participating Experts: 1
Solution Grade: B
 
 
[+][-]05.29.2008 at 12:06PM PDT, ID: 21672326

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628