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 (AndrewAMD, Nymphodora, Quad), 919 guests, and 6 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 1 of 2 1 2
C++ scripts #485961
05/18/22 10:44
05/18/22 10:44
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
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,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
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: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
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,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
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,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
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,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
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,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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