Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by madpower2000. 07/22/26 14:01
ZorroGPT
by TipmyPip. 07/21/26 17:54
New Zorro version 3.11
by jcl. 07/21/26 13:42
Lapsa's very own thread
by Lapsa. 07/18/26 13:40
Purchase A8 full licence version
by ukgamer. 07/17/26 05:52
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (NorbertSz, TipmyPip, 1 invisible), 3,731 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Ephraim, Student_64151
19223 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Development from different folder with Eval Shell #489552
Yesterday at 10:57
Yesterday at 10:57
Joined: Jan 2022
Posts: 78
Budapest
N
NorbertSz Online OP
Junior Member
NorbertSz  Online OP
Junior Member
N

Joined: Jan 2022
Posts: 78
Budapest
Hello,

I use a separate development folder for coding my strategies, mainly because the projects may become more complex later and I want to keep them under standalone version control. After compilation, a post-build script copies the generated .dll file into Zorro’s Strategy folder, here's how.

This workflow normally works as expected.
However, after I included the Eval Shell (<evars.h> and the other stuff to _optimize), built one script successfully and try to run,
I get the following error:

Code
Zorro64 S 3.11.2
(c) oP group Germany 2026
Registered: Zorro S Subscription

3 start
Error 062: Can't open "3.cpp" (rb:2)


As I see Zorro’s built-in compiler needs access to the source .cpp file in order to extract the _optimize variables and compile the individual strategy variants. In my setup, however, the source file is not located in Zorro’s Strategy folder. It also does not have the expected strategy name, since the entry file is called main.cpp.

Is there a supported way to use the Evaluation Shell with externally compiled strategies and a separate source directory?
I would prefer to keep the Zorro Strategy folder clean while preserving my Git-based workflow, especially for potentially large, multi-file codebases.

Last edited by NorbertSz; Yesterday at 11:44.
Re: Development from different folder with Eval Shell [Re: NorbertSz] #489553
Yesterday at 13:14
Yesterday at 13:14
Joined: Feb 2017
Posts: 1,823
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,823
Chicago
There's a lot of ways to do this.

One way is to place a symbolic link to the header (or header directory) in the Strategy folder. So you can do this in your script:

Code
#include <symlinked_extraheader.h>
or this:
Code
#include <symlinked_folder/extraheader.h>
For this, you will need Microsoft's mklink command, which is documented here:
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/mklink

Re: Development from different folder with Eval Shell [Re: AndrewAMD] #489561
3 hours ago
3 hours ago
Joined: Jan 2022
Posts: 78
Budapest
N
NorbertSz Online OP
Junior Member
NorbertSz  Online OP
Junior Member
N

Joined: Jan 2022
Posts: 78
Budapest
My project already compiles successfully with external headers. The problem is that the Eval Shell appears to open the strategy source file itself, such as 3.cpp, in order to parse the _optimize variables. In my setup, that source file is not located in Zorro’s default Strategy folder.

I also tried selecting [Change folder] from the Action dropdown and then choosing main.cpp from my custom project directory. Zorro finds and compiles the file successfully, but after that the Eval Shell still cannot open the cpp file. See the attached screenshot.

I also configured ZorroFix.ini as follows:

Code
StrategyFolder = "C:\repo\my-super-secret-strategy-folder"


After restarting Zorro:

- Zorro points to the correct folder at start
- I can select "main"
- I click Test
- the script compiles successfully
- however, I still get the same error:

Code
Zorro64 S 3.11.2
(c) oP group Germany 2026
Registered: Zorro S Subscription

main.cpp compiling..
main start
Error 062: Can't open "main.cpp" (rb:2)


AndrewAMD, I understand that your suggestion could also be extended to creating a symbolic link for the entire Strategy folder, pointing it to an external project directory. That could work, but I don't see it as a sustainable development setup, especially when working with multiple strategies. Thanks for the idea, it will be my Plan B.

Is there a more robust way to use the Evaluation Shell with externally managed, multi-file strategy projects?

Attached Files z.png
Re: Development from different folder with Eval Shell [Re: AndrewAMD] #489562
2 hours ago
2 hours ago
Joined: Jan 2022
Posts: 78
Budapest
N
NorbertSz Online OP
Junior Member
NorbertSz  Online OP
Junior Member
N

Joined: Jan 2022
Posts: 78
Budapest
Plan B is working, screenshot attached.
Code
mklink /J "C:\zorro\Strategy" "C:\repo\my-super-secret-strategy-folder"

Still looking for Plan A.

Attached Files z2.png
Last edited by NorbertSz; 2 hours ago.
Re: Development from different folder with Eval Shell [Re: NorbertSz] #489563
1 hour ago
1 hour ago
Joined: Jan 2022
Posts: 78
Budapest
N
NorbertSz Online OP
Junior Member
NorbertSz  Online OP
Junior Member
N

Joined: Jan 2022
Posts: 78
Budapest
I checked eval.c and eval2.c. The problem is that the Strategy folder is hardcoded:
Code
#define VARLIST strf("Strategy\\%s.cpp",RootName)


Could you please expose the currently selected Strategy folder through trading.h -> variables.h?
Code
#define StrategyFolder g->sStrategyFolder


Then the VARLIST definitions in eval.c and eval2.c could use:
Code
#define VARLIST strf("%s\\%s.cpp",StrategyFolder,RootName)


This would allow the Eval Shell script to use the folder defined in the ZorroFix.ini or selected through "[Change Folder]", instead of always assuming that the folder is named “Strategy” in Zorro root.

Last edited by NorbertSz; 51 minutes ago.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1