Using Value from another ex4-file

Back to topics list To post a new topic, please log in or register
avatar
9
bodda 2015.03.27 19:43
 

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

avatar
108
eddie 2016.07.12 22:13 #
 

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.


Back to topics list  

To add comments, please log in or register