Struct in library

 

It is possible to inlude struct in library? When i try to do it then occurs error  "ambiguous call to overloaded function with the same parameters".



See below example.


#property library
#property version   "1.00"
#property strict

#include <clsStruct.mqh>

bool CheckCurrentCandle(int Candle) export
{ 

   strGlobal arr[1]; <- struct in clsStruct file
   int mn = arr[0].magicnumber = 123;
   
   
   if (mn==Candle)
   {    
      return(true);
   }   
   return(false);      
}
 

variable.mqh

#property copyright "Copyright 2019, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property strict
struct firststr
  {
   int first;
   int second;
  };

library

#property library
#property copyright "Copyright 2019, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict

#include <variable.mqh>

int test()
{
  firststr arr[1];
  arr[0].first = 10;
  return(0);
}




Reason: