Sorry for my late answer but we had some examens:
I worked a little bit on the program. At the momen I have a problem i can't solve. The thing is I need to use a ddl file in assambly. I wrote some code for a dft. My problem is how can I copy my vector with al the sample values to the dll file. At the moment I dit this.
in my exe file
1 2 3
|
#define DllImport __declspec( dllimport )
std::vector<double> fft;
fft = DFTValue(xsignal, fftSample);
|
DFTValue is the function in the DLL
in my dll header file
1 2 3 4 5 6 7
|
#ifdef DFT_FFT_DLL_EXPORTS
#define DFT_FFT_DLL_API __declspec(dllexport)
#else
#define DFT_FFT_DLL_API __declspec(dllimport)
#endif
//dft function
static DFT_FFT_DLL_API std::vector<double> DFTValue(std::vector<double>, int);
|
dll file buids fine
i got th following error in the exe file:
MyForm.obj : error LNK2028: unresolved token (0A0004A3) "class std::vector<double,class std::allocator<double> > __cdecl testingGraph::DFTValue(class std::vector<double,class std::allocator<double> >,int)" (?DFTValue@testingGraph@@$$FYA?AV?$vector@NV?$allocator@N@std@@@std@@V23@H@Z) referenced in function "public: void __clrcall testingGraph::MyForm::drawChart(void)" (?drawChart@MyForm@testingGraph@@$$FQ$AAMXXZ)
2>MyForm.obj : error LNK2019: unresolved external symbol "class std::vector<double,class std::allocator<double> > __cdecl testingGraph::DFTValue(class std::vector<double,class std::allocator<double> >,int)" (?DFTValue@testingGraph@@$$FYA?AV?$vector@NV?$allocator@N@std@@@std@@V23@H@Z) referenced in function "public: void __clrcall testingGraph::MyForm::drawChart(void)" (?drawChart@MyForm@testingGraph@@$$FQ$AAMXXZ)
2>C:\Users\Swen\Documents\Visual Studio 2012\Projects\testingGraph\Debug\testingGraph.exe : fatal error LNK1120: 2 unresolved externals
any tips how to put and get a vector to and from a dll woud be really helpfull.
Thank you all
Almost forgot yes it's needt to be a dft or fft