Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, monk12, Quad), 829 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: New Zorro version 2.50 [Re: hast29] #486358
08/05/22 14:01
08/05/22 14:01
Joined: Feb 2017
Posts: 1,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
Chicago
Originally Posted by hast29
Also, is there any benefit from 64bit architecture ? I am just training and testing own scripts, writen directly in Zorro "simple C".
Quote
Using C++ as script language has many advantages. Additional development tools, such as the Visual Studio debugger and profiler, are available. External libraries, such as Boost, can be integrated without a wrapper. The 64-bit mode can access more memory for backtests. All lite-C functions and all system variables can still be used, but additionally you have C++ classes and templates at your disposal. Error handling is more strict and you'll get warnings about bad code style. The VC++ compiler is a bit slower than the lite-C on-the-fly compiler, but is only invoked when the script was changed. The resulting code runs equally fast or - in 64 bit mode - even faster. The only disadvantage is that you have to download and install Microsoft Visual Studio™ 2017 or above.
https://zorro-project.com/manual/en/dlls.htm

Re: New Zorro version 2.50 [Re: hast29] #486359
08/05/22 14:26
08/05/22 14:26
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Originally Posted by hast29
Do I understand you properly, if I install the 64bit MS Visual Studio in the computer, the problem will be solved ? MS Visual Studio is now free, so this is for me no extra costs option.

You will need Visual Studio for programming in C++, but not for merely running Zorro. The VC++ runtime would solve your problem. But we prefer no runtime installation for the 32 bit version, so we want to include the dlls directly. We had not had a PC so far where the 32 bit version would require a runtime. What's your Windows version?




Re: New Zorro version 2.50 [Re: jcl] #486360
08/05/22 17:20
08/05/22 17:20
Joined: Mar 2018
Posts: 62
hast29 Offline
Junior Member
hast29  Offline
Junior Member

Joined: Mar 2018
Posts: 62
Win 10 Home, 21H1, 64-bit

Re: New Zorro version 2.50 [Re: jcl] #486361
08/06/22 07:50
08/06/22 07:50
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Ok. Unpack FXCM.zip into the Zorro folder. The FXCM API is a 32 bit VC application and should thus enable your PC to also run the 32 bit Zorro without VC runtime, no matter what DLL was missing before. Let me know if this works.

For 64 bit you'll need the VC runtime in any case.

Re: New Zorro version 2.50 [Re: jcl] #486362
08/07/22 10:00
08/07/22 10:00
Joined: Jul 2022
Posts: 3
M
mun Offline
Guest
mun  Offline
Guest
M

Joined: Jul 2022
Posts: 3
Hi guys. I migrated my lite-C script to C++ to test the new feature "C++ scripts now start directly, like .c scripts (Zorro S and Visual Studio required). "

I found it only works when the script name is different. For example if you have script names:

Test1.c
Test1.cpp

and you click Test on Zorro64 for Test1 it will print "Test1" but it won't compile it; it just does nothing. The documentation states:

"If you have a mix of lite-C and C++ scripts, you can add a '+' to a .cpp script name for marking it in the scrollbox"

I tried this to name it Test1+.cpp and it compiled and ran as expected. Would it be possible to tighten the documentation wording a bit to say it must have different names if using a mix of lite-C and C++ files, or give some error message to indicate needing a different script name when trying to run it in Zorro64?

EDIT: I then tried creating the DLL directly from Visual Studio. When building it as Test1+.dll I get the same issue - Zorro64 prints "Test1+" then does nothing. However when I change the output dll name to Test1+64.dll then Zorro64 uses it correctly. But suffixing the 64 on the dll name is not mentioned in the help pages, I just figured it out from the way Zorro was building the included MyStrategy+.cpp

Last edited by mun; 08/07/22 13:05.
Re: New Zorro version 2.50 [Re: jcl] #486363
08/08/22 07:29
08/08/22 07:29
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
You need indeed different names for different scripts, otherwise .c will override .cpp. This will be mentioned more clearly in the manual.

"64" has no meaning in a script name. If you compiled a script with 32 bit, you must run it with 32 bit. You cannot run a 32 bit dll with a 64 bit program. It will simply not load.

Re: New Zorro version 2.50 [Re: jcl] #486388
08/09/22 15:50
08/09/22 15:50
Joined: Mar 2018
Posts: 62
hast29 Offline
Junior Member
hast29  Offline
Junior Member

Joined: Mar 2018
Posts: 62
Hi jcl, yes unpacking FXCM.zip solved the issue for the 32-bit. Zorro 2.50.2 starts and runs OK now, on my desktop computer.

I will not yet use the 64-bit Version and the C++ coding. Perhaps later.The advantages mentioned by AndrewAMD could be of a good use for me, when I progress more with my programming skills.

I am all set now with the new 2.50.2, thank you for the support.

Re: New Zorro version 2.50 [Re: jcl] #486685
09/17/22 13:29
09/17/22 13:29
Joined: Dec 2019
Posts: 53
ozgur Offline
Junior Member
ozgur  Offline
Junior Member

Joined: Dec 2019
Posts: 53
A small bug: when a dialog opens after clicking "[Change Folder]" in Zorro64, cpp files aren't shown.

Re: New Zorro version 2.50 [Re: jcl] #486698
09/19/22 13:42
09/19/22 13:42
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Thanks, this should be fixed in the new beta version.

Re: New Zorro version 2.50 [Re: jcl] #486818
10/15/22 16:53
10/15/22 16:53
Joined: Feb 2021
Posts: 2
Ireland
S
Sc1entia Offline
Guest
Sc1entia  Offline
Guest
S

Joined: Feb 2021
Posts: 2
Ireland
Hi folks,

Just following up on the post from “mun” above, and have noticed the Zorro64 dll name dependency (for Zorro 2.50).

I have reduced the script to very basic functionality – it prints out “main” from main() and “INITRUN” from run().

When I manually compile the script in Visual Studio as a x32, it (Test.dll) loads and “tests” fine from Zorro(32). Testing from Zorro64 just prints two empty lines followed by the name of the script on the third line (in the Zorro64 status box) – no error message.

When I compile the script in Visual Studio as a x64, in Zorro(32) it tries to load (when Test is clicked) and then produces an Error 061: invalid DLL (….). This is expected behaviour.

When I load/Test the same x64 dll strategy file in Zorro64, it just does the same as previous - prints the two empty lines followed by the name of the script - nothing else. It does the same when it loads other x32 strategy files (two empty lines and the name of the file).

When I rename the x64 dll strategy file to Test64.dll, the Script retains the same name in Zorro64 but it now executes properly. Zorro64 is truncating the 64 from the name of the dll file (i.e. If I rename the x64 dll to Test6464.dll, Zorro64 shows the name as Test64).

Lastly, if I rename a x32 dll strategy file to include 64 at the end of the name, Zorro64 then tells me that it’s an invalid DLL. I can’t think why I would do this in reality – just including for completeness.

So Zorro64 is using the ending part of the compiled strategy dll to figure out if should be executed as a x64. If it’s not present, then Zorro64 won’t even try to execute it as a x64. While “64” has no meaning in a script source name, it does indeed have a meaning in the compiled dll name (as far as Zorro64 is concerned).

It took me a few hours of mucking about today to see what I was doing wrong. I couldn’t find anything in the documentation indicating that I need to rename the x64 Visual Studio compiled .dll to get it working in Zorro64 - perhaps this could be included in future versions of the documentation.

Regards,

Kieran

Last edited by Sc1entia; 10/15/22 16:55.
Page 2 of 3 1 2 3

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1