Using Value from another ex4-file

 

Hello I'm trying to import a function from file1.ex4 to file2.ex4

 

 in file1.mq4 i got these lines.

double getvalue(int i)

  {

   double r;

   r = ExtATRBuffer[i];

   return(r);

  } 

 

 in file2.mq4 i got these lines.

#import "myATR.ex4"

double   getvalue(int i);

#import 

 

 When I start the project I get these messages.

unresolved import function call

Cannot find 'getvalue' in 'file1.ex4'

 

Apparently the function cannot be found, but I cannot see why (or I totally missunderstood the import function procedure).

/M

 

Hi!

Only exported functions can be imported from ex4 files.

Use:

double getvalue(int i) export

  {

   double r;

   r = ExtATRBuffer[i];

   return(r);

  } 


But i think your ExtATRBuffer will have no values.