-
Generating dll file
Hi guys,
I have a function written in C and I want to change it to dll in order to then implement it in the Labview. I followed the step by step walkthrough of msdn site (I'm using VS 2010), selected a dll application type. and just changed the function's header to:
Code:
extern "C" _declspec(dllexport) extern "C" _declspec(dllexport) int Train(int numOfTrials,
int numPerTrial,
int numOfCommands,
double* Data_in,
double* b_in,
double* bB_in,
double* gmeans1_out,
double* gmeans2l_out,
double* gmeans2r_out);
void PrintMatrix(CvMat *Matrix,int Rows,int Cols);
extern "C" _declspec(dllexport) int Train(int numOfTrials,
int numPerTrial,
int numOfCommands,
double* Data_in,
double* b_in,
double* bB_in,
double* gmeans1_out,
double* gmeans2l_out,
double* gmeans2r_out)
And then copy and pasted the body of the function.
Then I'm supposed to run the file to get the dll generated output. But, in debug mode even though a dll is generated I get the error message that: "Unable to start program '\\.....\TrainDll.dll'. And when I run it in release mode it just freezes in the Generating Code step and never finishes.
Do you have any idea what's wrong here and what should I do?
Thanx
-
You don't run DLLs; you use them in your executable program.
-
Of course, but you first have to generate them. How do you generate? by running the dll-application type project you made.