J
Jack
Hi guys,
So I have created a DLL file called myLib.dll. This dll is nothing but
a simple class with a constructor that upon constructor
initialization, it writes a message to the console. The class is
wrapped in a namespace called myLibNameSpace.
Using VS2008, I created a new project and added myLib.dll as a
reference to the project. What I want to do is to access my DLL and
initialize the class. Here is what I have
#include "stdafx.h"
#using <myLib.dll>
using namespace System;
using namespace myLibNameSpace;
int main(array< System::String ^ > ^args)
{
myLibClass ^myClass = gcnew myLibClass(10);
Console::Write("Press any key to continue...");
Console::ReadKey();
return 0;
}
When I compile this new project, I get tons of error messages saying
everything from: myLibNameSpace does not exists to myLibClass is an
undeclared identifier. (I have copied the DLL to the local directory
where the source file/debug file for my current project is located.)
Any ideas?
Thanks
So I have created a DLL file called myLib.dll. This dll is nothing but
a simple class with a constructor that upon constructor
initialization, it writes a message to the console. The class is
wrapped in a namespace called myLibNameSpace.
Using VS2008, I created a new project and added myLib.dll as a
reference to the project. What I want to do is to access my DLL and
initialize the class. Here is what I have
#include "stdafx.h"
#using <myLib.dll>
using namespace System;
using namespace myLibNameSpace;
int main(array< System::String ^ > ^args)
{
myLibClass ^myClass = gcnew myLibClass(10);
Console::Write("Press any key to continue...");
Console::ReadKey();
return 0;
}
When I compile this new project, I get tons of error messages saying
everything from: myLibNameSpace does not exists to myLibClass is an
undeclared identifier. (I have copied the DLL to the local directory
where the source file/debug file for my current project is located.)
Any ideas?
Thanks