Hi,
I am trying to make and use my own DLL within a C++/CLI project.
The DLL project contains an header utc.h file with the following declaration:
namespace utc
{
__declspec(dllexport) void dthr (int dt[3], int hr[3]);
}
The source of the dthr.cpp file starts with:
namespace utc
{
__declspec(dllexport) void dthr (int dt[3], int hr[3])
{
}
}
The build of the utc.dll file is successful.
Within a Forms C++/CLI project, I have a WriteToLog.cpp file that starts with:
#include "stdafx.h"
#include "utc.h"
using namespace utc;
void WriteToLog(String ^mess)
{
int dt[3], hr[3];
dthr(dt, hr);
WriteToLog compiles fine. Using the "Properties -> Framework and references" dialog, I have added utc.dll as a reference.
But the linker does not find dthr().
What am I missing?
As a side question, it seems that I cannot use a static C++ .lib file with a C++/CLI application: the add Reference dialog does not support .lib files.
Is there another way to use a .lib file? I would prefer that to using a DLL.
Thanks.