Compiler error

How to create strategies and indicators
Message
Author
SquareMeal
Posts: 40
Joined: Wed Sep 15, 2010 6:52 am

Compiler error

#1 Postby SquareMeal » Wed Sep 15, 2010 7:01 am

My first time to post, hope this location is OK.

I'm a new ForexTester user - love the program!

I installed Lazarus and am attempting to write my first program using your DemoStrategy as a guide.

When I compile, I get the following error:

DemoStrategy(1,1)Fatal: Can't find unit Graphics used by StrategyInterfaceUnit

I have looked in every subfolder of C:\ForexTester2\... and cannot find any file named Graphics. My thinking was that if I found such a file, I would copy it into my C:\lazarus\projects folder ... correct?

Regards,
creativity + willful purpose

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#2 Postby FT Support » Wed Sep 15, 2010 7:29 am

Check our other product here:
http://www.forexcopier.com

SquareMeal
Posts: 40
Joined: Wed Sep 15, 2010 6:52 am

Can't find unit Graphics used by StrategyInterfaceUnit

#3 Postby SquareMeal » Wed Sep 15, 2010 11:03 pm

Thank you for the links. I checked them out and looked into what I found... such as "add the LCL as a requirement to the Lazarus package" (I found a table where it was in there as a requirement)... and then I used a Clean and Build wizard within lazarus to rebuild everything.

I'm still getting the same error and don't know what to do next.

My version of Lazarus is:
0.9.28.2 beta
SVN Revision 22279
i386-win32-win32/win64

I'm running Windows Vista Home (Win32).

Can I show you the contents of any particular directory which might help you guide me?

Thanks,

SquareMeal
creativity + willful purpose

SquareMeal
Posts: 40
Joined: Wed Sep 15, 2010 6:52 am

#4 Postby SquareMeal » Wed Sep 15, 2010 11:16 pm

Ooops... I just noticed that I had not scrolled through a small window created during the build. I received a few error messages. I couldn't copy the text, so I snagged it into a JPG and attached it to this post.

Note: I am willing to use any IDE environment that will run on my machine. I am trying to use Lazarus because the free Delphi IDE was not available on the website -- the only ones available cost big $$$ -- so I am looking for free or cheap.

If you think I should give up on Lazarus and go with something else, please advise.

Regards,
SquareMeal
Attachments
Lazarus Build Errors.jpg
Lazarus Build Errors.jpg (98.88 KiB) Viewed 42531 times
creativity + willful purpose

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#5 Postby FT Support » Thu Sep 16, 2010 1:54 am

Please try to de-install Lazarus v28 and install v26
Check our other product here:
http://www.forexcopier.com

SquareMeal
Posts: 40
Joined: Wed Sep 15, 2010 6:52 am

Compiling Error

#6 Postby SquareMeal » Thu Sep 16, 2010 8:52 pm

I de-installed v28 and installed:

Version 0.9.26.2 beta
FPC Version 2.2.2
SVN Revision 18980
i386-win32

There were no error messages during installation.

I created DemoStrategy as a library project and tried to Build, but got the same error message I've got with v28:

"StrategyInterfaceUnit.pas(1,1)Fatal: Can't find unit graphics used by StrategyInterfaceUnit."

What should I try next?

Thanks,
SquareMeal
creativity + willful purpose

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#7 Postby FT Support » Fri Sep 17, 2010 4:55 am

Please do the following steps:

1) Go to Project -> Project Inspector menu
2) In next window click "Add"
3) In "Add to project window" choose "LCL" on "New Requirement" tab (see "LCL.gif" screenshot)
4) Go to Project -> "Compiler Options"
5) Switch to "Parsing" tab and choose "Delphi" as a Syntax mode
6) Switch to "Code" tab and choose "Target OS" = WinXX

I hope that project will be built successfully after that.
We also recommend to watch this video tutorial to learn more about compilind dlls with Lazarus: http://www.youtube.com/watch?v=kL7z8kG7WCw
Attachments
menu.gif
menu.gif (22.27 KiB) Viewed 42508 times
LCL.gif
LCL.gif (28.15 KiB) Viewed 42508 times
syntax.gif
syntax.gif (21.23 KiB) Viewed 42508 times
platform.gif
platform.gif (24.24 KiB) Viewed 42508 times
Last edited by FT Support on Mon Nov 29, 2010 4:14 am, edited 1 time in total.
Check our other product here:
http://www.forexcopier.com

SquareMeal
Posts: 40
Joined: Wed Sep 15, 2010 6:52 am

Lazarus for Win32 Compiler Error

#8 Postby SquareMeal » Fri Sep 17, 2010 6:36 am

That worked -- perfect!

I'll watch the video. Thank you for your help.

SquareMeal
creativity + willful purpose

plasmon
Posts: 14
Joined: Mon Apr 15, 2013 2:45 pm

Re: Compiler error

#9 Postby plasmon » Sat Nov 21, 2015 11:34 am

Hi,

I have installed Embarcadero® Delphi 10 Seattle Version 23.0.20618.2753 and am trying to execute the simple strategy as described here: viewtopic.php?f=9&t=1013

However, I have copied StrategyInterfaceUnit and TechnicalFunctions to the correct folder, but everytime I try to run the following code, it says '[dcc32 Fatal Error] StrategyInterfaceUnit.pas(83): F2613 Unit 'graphics' not found.'

Could you please help?

This is the code I have been trying to run:

library Project1;

{ Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }

uses
System.SysUtils, StrategyInterfaceUnit, TechnicalFunctions;

procedure InitStrategy; stdcall;
begin
StrategyShortName('DemoStrategy');
StrategyDescription('Demo strategy that does nothing');
end;


procedure DoneStrategy; stdcall;
begin

end;


procedure ResetStrategy; stdcall;
begin

end;


procedure GetSingleTick; stdcall;
begin

end;

exports
InitStrategy,
DoneStrategy,
ResetStrategy,
GetSingleTick;

end.


Many thanks.

FX Helper
Posts: 1477
Joined: Mon Apr 01, 2013 3:55 am

Re: Compiler error

#10 Postby FX Helper » Mon Nov 23, 2015 9:48 am

Hello,

Please try to download and install older version of Delphi, is seems that the problem is in current version.

plasmon
Posts: 14
Joined: Mon Apr 15, 2013 2:45 pm

Re: Compiler error

#11 Postby plasmon » Fri Jan 24, 2020 4:38 pm

Hi,

I have once again encountered the error shown above '[dcc32 Fatal Error] StrategyInterfaceUnit.pas(83): F2613 Unit 'graphics' not found.' I am using Rad Studio 10.3 to try to make the dlls. I have tried finding Borland Delphi 2006, which is the one I used last time to overcome this error, this version I can no longer find and even if I could, I'm not sure it would work on Windows 10.
Could you please tell me the best modern solution for writing and compiling dll automated strategies?

Thanks.

User avatar
toney88
Posts: 1
Joined: Mon May 04, 2020 9:46 am

Re: Compiler error

#12 Postby toney88 » Tue May 05, 2020 6:54 am

Bump here, I need the same thing.


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 26 guests