0

我正在尝试调用该DLL文件,以便可以使用 dll 中的函数。但我失败了。查看我遇到的错误:

#import "BPNN1.dll"
string Train(
   double &inpTrain[], // Input training data (1D array carrying 2D data, old first)
   double &outTarget[],// Output target data for training (2D data as 1D array, oldest 1st)
   double &outTrain[], // Output 1D array to hold net outputs from training
   int    ntr,        // # of training sets
   int    UEW,        // Use Ext. Weights for initialization (1=use extInitWt, 0=use rnd)
   double &extInitWt[],// Input 1D array to hold 3D array of external initial weights
   double &trainedWt[],// Output 1D array to hold 3D array of trained weights
    int    numLayers,  // # of layers including input, hidden and output
    int    &lSz[],      // # of neurons in layers. lSz[0] is # of net inputs
    int    AFT,        // Type of neuron activation function (0:sigm, 1:tanh, 2:x/(1+x))
    int    OAF,        // 1 enables activation function for output layer; 0 disables
    int    nep,        // Max # of training epochs
    double maxMSE      // Max MSE; training stops once maxMSE is reached
    );

string Test(
   double &inpTest[],  // Input test data (2D data as 1D array, oldest first)
   double &outTest[],  // Output 1D array to hold net outputs from training (oldest first)
   int    ntt,        // # of test sets
   double &extInitWt[],// Input 1D array to hold 3D array of external initial weights
    int    numLayers,  // # of layers including input, hidden and output
    int    &lSz[],      // # of neurons in layers. lSz[0] is # of net inputs
   int    AFT,        // Type of neuron activation function (0:sigm, 1:tanh, 2:x/(1+x))
    int    OAF         // 1 enables activation function for output layer; 0 disables
    );
#import

错误:
资源图片

所以这意味着 dll 无法加载和读取。那么有没有办法可以.cpp在我的 MQL5 程序中包含源文件并使用它?请给我建议出路。

4

0 回答 0