Gamestudio Links
Zorro Links
Newest Posts
C++ scripts
by AndrewAMD. 07/02/22 13:02
FXCM doesn't show up in Broker drop-down
by Smallz. 07/02/22 12:32
History & HistoryFolder
by DdlV. 07/01/22 14:57
car.c how to add a trailer or wagon?
by Ice2642. 07/01/22 13:35
IB: brokercommand to cancel **all** orders.
by AndrewAMD. 06/30/22 17:21
Save As dialog box (like file_select)
by jcl. 06/30/22 10:18
AUM Magazine
Latest Screens
DEAD TASTE
Tactics of World War I
Hecknex World
Scheherazade's Journey
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 446 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Anas, PeroPero, AlexTomb, BigW, QJSH
18790 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
C++ scripts #485961
05/18/22 10:44
05/18/22 10:44
Joined: Jul 2000
Posts: 27,831
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,831
Frankfurt
The new beta version can directly invoke cl.exe and compile .cpp scripts without setting up a VC++ project. This is one of the prerequisites for a future 64 bit version with no lite-C compiler. Check it out!

https://opserver.de/down/ZorroBeta.zip

Re: C++ scripts [Re: jcl] #485967
05/18/22 11:33
05/18/22 11:33
Joined: Aug 2017
Posts: 198
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 198
Netherlands
This is great, since I'm not a fan of Visual c++

Re: C++ scripts [Re: jcl] #485973
05/18/22 14:44
05/18/22 14:44
Joined: Feb 2017
Posts: 1,481
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,481
Chicago
Version S 2.49.1b:

*.cpp files in the Strategy folder do not appear in the drop-down list of scripts, and there is no Source\compile.bat file. Did it not make it into the current beta?

Re: C++ scripts [Re: jcl] #485974
05/18/22 15:45
05/18/22 15:45
Joined: Apr 2008
Posts: 546
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 546
Austria
Check the zorro.exe file date, it should be from 12:56 today. I think the version number was not increased, so there is an older 2.49.1b from last week.

Re: C++ scripts [Re: jcl] #485975
05/18/22 16:41
05/18/22 16:41
Joined: Feb 2017
Posts: 1,481
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,481
Chicago
I downloaded it yet again, and now we're in business.

The documentation says it was designed for VC++ 2022, but I'm having no problems compiling with 2019. (Too lazy to install 2022.)

Re: C++ scripts [Re: jcl] #485976
05/18/22 16:43
05/18/22 16:43
Joined: Feb 2017
Posts: 1,481
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,481
Chicago
I think pressing the Edit button for filename.cpp attempts to open filename.c.

Also, are precompiled headers not supported? (Not a big deal.)

It would also be nice if there was a "[New C++ Script]" selection in the drop down, distinguished from "[New Lite-C Script]".

Lastly, the Help file links are not working from Notepad++ C++ out of the box, but I can fix this by changing Language to C. This could cause problems if i start writing C++ -only code, though (i.e. incompatible with C).

I might consider using Visual Studio directly to edit C++ files, even if in the Strategy folder. The intellisense works very well if you simply open up the Zorro Folder, and then from there open strategy files in subfolders. This might even be the best default behavior, to open a C++ file in Visual Studio from the Zorro folder root.

Attached Files 001.PNG
Re: C++ scripts [Re: jcl] #485983
05/20/22 17:35
05/20/22 17:35
Joined: Feb 2017
Posts: 1,481
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,481
Chicago
In Visual Studio, if you want to see red squiggly lines in Intellisense, all you have to do is add a file CppProperties.json to the root of the Zorro folder:
https://docs.microsoft.com/en-us/cp...e-code-navigation-with-cpppropertiesjson

Example content:
Code
{
	"configurations": [
		{
			"inheritEnvironments": [
				"msvc_x86"
			],
			"name": "x86-Release",
			"includePath": [
				"${env.INCLUDE}",
				"${workspaceRoot}\\**"
			],
			"defines": [
				"WIN32"
			],
			"intelliSenseMode": "windows-msvc-x86"
		}
	]
}

Attached Files 002.PNG
Re: C++ scripts [Re: jcl] #485990
05/25/22 11:59
05/25/22 11:59
Joined: May 2022
Posts: 10
Q
QuadraQuant Offline
Newbie
QuadraQuant  Offline
Newbie
Q

Joined: May 2022
Posts: 10
As a side note for Wine lovers, this version won't boot if visual c++ 2015+ is not installed. Use the embedded vc_redist.x6.exe or install through winetricks.

Re: C++ scripts [Re: QuadraQuant] #485998
05/25/22 21:20
05/25/22 21:20
Joined: May 2022
Posts: 10
Q
QuadraQuant Offline
Newbie
QuadraQuant  Offline
Newbie
Q

Joined: May 2022
Posts: 10
Originally Posted by QuadraQuant
As a side note for Wine lovers, this version won't boot if visual c++ 2015+ is not installed. Use the embedded vc_redist.x6.exe or install through winetricks.


Or you can read the relevant part of the doc. I didn't. Shame on me.

Re: C++ scripts [Re: jcl] #486073
06/07/22 14:01
06/07/22 14:01
Joined: Jul 2000
Posts: 27,831
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,831
Frankfurt
While you're at testing .cpp scripts, please test them also with the new 64-bit Zorro in the Zorro64 folder of today's beta version. Let me know if you encounter any problem.

Page 1 of 2 1 2

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