# CGE Editor: Error on compiling (64 bit cross compile)

**URL:** https://forum.castle-engine.io/t/cge-editor-error-on-compiling-64-bit-cross-compile/242
**Category:** Uncategorized
**Created:** [October 23, 2020, 4:37pm UTC](https://forum.castle-engine.io/t/cge-editor-error-on-compiling-64-bit-cross-compile/242 "2020-10-23T16:37:37Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Kobalt](https://forum.castle-engine.io/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@Kobalt](https://forum.castle-engine.io/u/Kobalt)
#### Post date: [October 23, 2020, 4:37pm UTC](https://forum.castle-engine.io/t/cge-editor-error-on-compiling-64-bit-cross-compile/242/1 "2020-10-23T16:37:37Z")

</div>

Hi there,  
appreciate and follow this project for a long time. I really like it. Nevertheless, had some time left today and tried to use the CGE Editor as proposed at several locations in the manual.

I ran in an error with my older setup (Lazarus 1.8.4 + FPC 2.0.4, 64 bit version), so I tried the new setup: Lazarus 2.0.10 + FPC 2.4.0, 64 bit version. Unfortunately I ran into the same error.

Dev. environment: Lazarus 1.8.4 + FPC 2.0.4, 64 bit OR Lazarus 2.0.10 + FPC 2.4.0, 64 bit  
OS: Win 8.1, 64 bit

When using the pre-built CGE Editor from snapshot 6.5 OR using the self-built (FPC 2.4.0, 64 bit version) CGE Editor from the current (23/10/2020) snapshot of the Git repo, I get this error message on trying to run any example in the CGE Editor:  
‘Compiling project\_standalone.lpr  
Fatal: Cannot open file “project\_standalone.lpr”  
Fatal: Compilation aborted  
Error: (some dirs)\bin\ppcx64.exe returned an error exitcode  
Exception “Exception”:  
Failed to compile’

When playing around with some examples a few month ago, where I didn’t use the CGE Editor at all, the examples worked.

Any hint on how to solve the problem is welcome.

Best regards  
Kobalt

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [October 23, 2020, 6:45pm UTC](https://forum.castle-engine.io/t/cge-editor-error-on-compiling-64-bit-cross-compile/242/2 "2020-10-23T18:45:20Z")

</div>

Have you possibly made a mistake about FPC versions in your post?

We don’t support FPC 2.0.4 or 2.4.0, they would be ancient. I’m not sure does Lazarus 2.x supports so old FPC. For the latest engine, we require FPC at least 3.0.2 (see [https://castle-engine.io/supported\_compilers.php](https://castle-engine.io/supported_compilers.php) ) and we recommend just using the latest FPC stable 3.2.0.

As for your problem, it seems that “project\_standalone.lpr” was not created. This is possible if you didn’t use he pre-built CGE editor to create the project. You probably instead used to self-built CGE editor, but you didn’t build the [build tool](https://github.com/castle-engine/castle-engine/wiki/Build-Tool). At project creation, the CGE editor calls the command-line build tool to create “project\_standalone.lpr”.

You should have seen a clear error message about it when creating the project.

If you build the engine yourself, you have to build both CGE editor and CGE build tool, and place the build tool on $PATH. Alternatively, use the pre-built version where everything is set up such that changing $PATH is not necessary.

To fix it now, just enter the project, and execute `castle-engine generate-program` in the project directory.

Or, you can create the “project\_standalone.lpr” manually by replacing macros in [https://github.com/castle-engine/castle-engine/blob/master/tools/build-tool/data/standalone/program\_template.lpr](https://github.com/castle-engine/castle-engine/blob/master/tools/build-tool/data/standalone/program_template.lpr) . Similar you could create LPI file from [https://github.com/castle-engine/castle-engine/blob/master/tools/build-tool/data/standalone/program\_template.lpi](https://github.com/castle-engine/castle-engine/blob/master/tools/build-tool/data/standalone/program_template.lpi) .

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [October 23, 2020, 6:49pm UTC](https://forum.castle-engine.io/t/cge-editor-error-on-compiling-64-bit-cross-compile/242/3 "2020-10-23T18:49:11Z")

</div>

> [@Kobalt](#):
>
> I get this error message on trying to run any example in the CGE Editor:

Hm, reading your post again, you write you get this error with “”“any example in the CGE Editor:”". This is weird, examples do not have “project\_standalone.lpr”.

What exactly project do you open in CGE editor? Try e.g. `examples/screen_effects_demo`, in the CGE editor you should do “Open Project” and then point to the “CastleEngineManifest.xml” inside.

---

<div class="post-metadata">

### Author: ![Kobalt](https://forum.castle-engine.io/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@Kobalt](https://forum.castle-engine.io/u/Kobalt)
#### Post date: [October 24, 2020, 1:44am UTC](https://forum.castle-engine.io/t/cge-editor-error-on-compiling-64-bit-cross-compile/242/4 "2020-10-24T01:44:33Z")

</div>

Thanks for your quick response!

> [@michalis](#):
>
> Have you possibly made a mistake about FPC versions in your post?

Exactly! 2.0.4 should be 3.0.2 and 2.4.0 should be 3.2.0. Not sure why I got the version numbers wrong, sorry about that.

> [@michalis](#):
>
> “project\_standalone.lpr” was not created. This is possible if you didn’t use he pre-built CGE editor to create the project. You probably instead used to self-built CGE editor

This made me realize, that I was indeed confronted with **two different errors** which appeared to be the same. I had put the self-compiled Build Tool (and all the other tools) in the same dir. as the self-built CGE Editor and checked carefully for the standalone.lpr now. And you are right, this fixes this issue (for some reason the self-built CGE Editor does work now quite well…).

With the pre-built CGE Editor I still get this on compiling an empty new project:  
'castleparameters.pas(304,21) Error: Duplicate identifier “Options”  
castleparameters.pas(307,27) Error: Duplicate identifier “Options”  
castleparameters.pas(341,1) Fatal: There were 2 errors compiling module, stopping  
Fatal: Compilation aborted  
Error: (some dirs)\bin\ppcx64.exe returned an error exitcode  
Exception “Exception”:  
Failed to compile’

> [@michalis](#):
>
> What exactly project do you open in CGE editor? Try e.g. `examples/screen_effects_demo`

I was kind of unclear here. I refered to my own projects, actually just different new empty projects (the 6.5 snapshot does only allow for empty projects bc. the project\_templates folder doesn’t provide any templates for 2d or 3d game projects as far as I could see).

I tried the screen\_effects\_demo, it works well with the self-built CGE Editor, it gives the same error (duplicate “Options” identifier) for the pre-built CGE Editor.

Thanks for your help. I consider this closed since I can work with the git snapshot Editor, and am looking forward to the 7.0 release :-).

Best regards  
Kobalt

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [October 24, 2020, 2:05am UTC](https://forum.castle-engine.io/t/cge-editor-error-on-compiling-64-bit-cross-compile/242/5 "2020-10-24T02:05:26Z")

</div>

OK, I’m happy it is solved! Maybe I can help with some additional problems you mention:

> castleparameters.pas(304,21) Error: Duplicate identifier “Options”  
> castleparameters.pas(307,27) Error: Duplicate identifier “Options”

These errors are possible only with an old CGE version. They were fixed in January this year ( [Rename Options parameter to AOptions, to not conflict with TStringLis… · castle-engine/castle-engine@c46558a · GitHub](https://github.com/castle-engine/castle-engine/commit/c46558ac48a9a3a7b7ef730d982ed14d2b695a8c#diff-805502f52e25ca99ad4d89ca98c891149179ab2b6ee30e8976569ae6e6f46dd5) ). Maybe you have a different, old, version of CGE accidentally used?

Check:

- Where does `$CASTLE_ENGINE_PATH` point, if you have such environment variable defined. On Windows, you can enter command-line and call  
`echo %CASTLE_ENGINE_PATH%`

- Does your fpc.cfg maybe refer to some old CGE directory using the `-Fuxxx` option? See [Configuration file](https://www.freepascal.org/docs-html/user/usersu10.html) to locate the FPC config file.

- If above ideas fail, you can try to compile from the command-line, and pass `-vu` parameter to FPC, to detailed information about where does it search/find for units. You can do it by compiling using CGE build tool like this:

The version of CGE should always compile with all FPC versions we support. We even automatically check it (using Jenkins) before updating the pre-built version each time.

> (the 6.5 snapshot does only allow for empty projects bc. the project\_templates folder doesn’t provide any templates for 2d or 3d game projects as far as I could see).

All the templates should be available. We added them in June, see [New useful project templates in the Castle Game Engine editor – Castle Game Engine](https://castle-engine.io/wp/2020/06/01/new-useful-project-templates-in-the-castle-game-engine-editor/) .

If you don’t have all the templates, then it also indicates you’re using old CGE version somehow. If your `CASTLE_ENGINE_PATH` points to an old CGE version, then the editor could be picking up all CGE directory, even if you run it from the directory contain latest CGE.

---

<div class="post-metadata">

### Author: ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)
#### Post date: [October 24, 2020, 2:12am UTC](https://forum.castle-engine.io/t/cge-editor-error-on-compiling-64-bit-cross-compile/242/6 "2020-10-24T02:12:11Z")

</div>

( Offtopic note: you have have experienced today problems posting on this forum, due to server misbehaving 🙂 It is fixed now. )

---

<div class="post-metadata">

### Author: ![Kobalt](https://forum.castle-engine.io/letter_avatar_proxy/v4/letter/k/41988e/32.png) [@Kobalt](https://forum.castle-engine.io/u/Kobalt)
#### Post date: [October 24, 2020, 10:50am UTC](https://forum.castle-engine.io/t/cge-editor-error-on-compiling-64-bit-cross-compile/242/7 "2020-10-24T10:50:03Z")

</div>

> [@michalis](#):
>
> These errors are possible only with an old CGE version.

> [@michalis](#):
>
> All the templates should be available. We added them in June

Oh, my bad! I just realized that the download from [Release Latest release of Castle Game Engine (Auto-Updated Snapshot) · castle-engine/castle-engine · GitHub](https://github.com/castle-engine/castle-engine/releases/tag/snapshot) is **auto-updated**. I had indeed an old version (from June 2019) of the zip file laying around on my hard disk. - As I was in a hurry, the download file is not very small and the version number 6.5 still matched, I assumed they are the same and did not download it again.

Now, everything makes sense! 🙂

> [@michalis](#):
>
> Offtopic note: you have have experienced today problems posting on this forum, due to server misbehaving 🙂 It is fixed now.

No harm done, thank you!
