Importing library to EA

 
I need help, please.
I try to import simple library file GBSend

double OutPutBid(double A, double B)
{
double C;
C= A+B;
GlobalVariableSet("AAA",C);
return(C);
}

and I get an error: Start function not found and cannot be run

and the EA

#import "GBSend.ex4"
OutPutBid(double A, double B);
#import

int init()
{
return(0);
}
int deinit()
{
return(0);
}
int start()
{
static double BidValue;
BidValue=Bid;
double Result = OutPutBid(BidValue,10*Point);
Comment("Result ",Result,"\n",GlobalVariableGet("AAA"));
return(0);
}

The EA has an error: 'import' - double quotes needed.

I never tried importing but this time I need to try.
Any help highly appreciated.

 
a very simple question to those who did the like stuff.
Can somebody please help?
 

Try to replace

#import "GBSend.ex4"
OutPutBid(double A, double B);
#import

to
#import "GBSend.ex4"
double OutPutBid(double A, double B);
#import
 
Your code compiles fine here (with Roger's suggestion). Make sure the compiled library is in the 'libraries' or 'experts' directory.

 

I added double to the function and same problem persists.
The library is in libraries folder.
Forgive my ignorance but to what SRC belongs?
I did everything in mql4 code page.

 
Brygada:

I added double to the function and same problem persists.
The library is in libraries folder.
Forgive my ignorance but to what SRC belongs?
I did everything in mql4 code page.

When you copy paste your code to the forum... Press the SRC button and paste the code there. It will preserve formatting (tabs, spaces, etc.). Haven't u noticed code is usually in a pink square on this forum?

Regarding your problem - it doesn't happen on my end. Maybe u can attach your actual files?

 
Library
double OutPutBid(double A, double B)
{
  double C;
  C= A+B;
  GlobalVariableSet("AAA",C);
  return(C);
}
EA
EA
#import "GBSend.ex4"
double OutPutBid(double A, double B);
#import 

int init()
{
  return(0);
}
int deinit()
{
   return(0);
}
int start()
{
  static double BidValue;
  BidValue=Bid;
  double Result = OutPutBid(BidValue,10*Point);
  Comment("Result ",Result,"\n",GlobalVariableGet("AAA"));
  return(0);
}
//+------------------------------------------------------------------+
 

Try this

Files:
ttt.mq4  1 kb
 

and this

Files:
tttttt.mq4  1 kb
 

It works!!!
Thank You very much and appreciate it.

 
Roger beat me to it...
B, you should use the built-in templates, that way u won't forget things like that 'library' property.
Reason: