I create a dll
in c++
. My dll
exploits some methods of the gsl dll
.
I call my dll
in Excel and on my pc it works well, but if I try to call the dll
from Excel in another pc returns an error:
"File not found".
All files are in the correct path.
What could be the problem??
Further informations:
I declare the function in Excel in the follow way:
Declare Function MY_DLL_P Lib "C:\Users\Baiso\Desktop\MY_DLL.dll" (ByVal file As String, ByRef results As Double) As Integer
This is a part of Excel function:
sol = MY_DLL_P(objDom.XML, results(0))
Debug.Print CStr(results(0))
Debug.Print CStr(results(1))
Debug.Print CStr(results(2))
Debug.Print CStr(sol)
Dll is in the correct path.
In my c++ project this is the header file MY_DLL.h:
static __declspec(dllexport) int _stdcall MY_DLL_P(char* file, double* result);
and this is MY_DLL.cpp file:
#include "MY_DLL.h"
#include "gsl\gsl_linalg.h"
#include "gsl\gsl_poly.h"
int MY_DLL_P(char* file, double* result)
{
...
}
and this is the file.def
LIBRARY "MY_DLL"
EXPORTS
MY_DLL_P