The International Simutrans Forum

 

Author Topic: Incorporating changes from Standard  (Read 9955 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20274
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Incorporating changes from Standard
« Reply #70 on: February 01, 2020, 10:59:34 AM »
Vladki - thank you: that is helpful. Note that it is not necessary to use an actual client and server for desync testing: connecting to a server running on the same machine is usually sufficient. Also, only a cross compile build on Windows will stay in sync with a Linux server: a Visual Studio build will not.

As to which parts of the code have caused loss of synchronisation problems, this is not confined to one area of the code, but can arise anywhere that client and server could in any way diverge affecting the simulation itself.

Offline Vladki

  • Devotee
  • *
  • Posts: 3458
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Incorporating changes from Standard
« Reply #71 on: February 01, 2020, 11:45:50 AM »
Using it on real game will bring more testers

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20274
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Incorporating changes from Standard
« Reply #72 on: February 01, 2020, 12:09:42 PM »
Using it on real game will bring more testers

This is true - and one thing that does also need to be tested is whether it compiles with the command line server build, as there is a problem with that in the current nightly builds.

Offline Vladki

  • Devotee
  • *
  • Posts: 3458
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Incorporating changes from Standard
« Reply #73 on: February 01, 2020, 12:20:59 PM »
until 120.1.3 (and slice view improvement) --> https://github.com/Phystam/simutrans-extended/tree/merge-from-standard120-1-3-fix based on extended version 14.7.
I tried to compile this branch on Linux and failed

In file included from bauer/brueckenbauer.cc:30:0:
bauer/../descriptor/building_desc.h: In member function ‘bool building_desc_t::is_transport_building() const’:
bauer/../descriptor/building_desc.h:300:117: error: ‘decoration_stop’ cannot be used as a function
  bool is_transport_building() const { return (type > headquarters  && type <= flat_dock) || is_type(decoration_stop(); }
                                                                                                                     ^

Offline Vladki

  • Devotee
  • *
  • Posts: 3458
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Incorporating changes from Standard
« Reply #74 on: February 01, 2020, 12:42:56 PM »
I have fixed the above bug - in the last line should be
Code: [Select]
is_type(decoration_stop); And compiled both client and server: http://list.extended.simutrans.org/phystam-binaries/
But it cannot load the new pakset - same error as mentioned here: https://forum.simutrans.com/index.php/topic,19430.msg184393.html#msg184393

Offline Phystam

  • Devotee
  • *
  • Posts: 495
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: Incorporating changes from Standard
« Reply #75 on: February 01, 2020, 12:45:27 PM »
Yes, decoration_stop is my another developing branch...
And, you should start the server with OLD pakset. NEW pakset has Ranran's newly introduced features, so there is no compatibility.

Offline Vladki

  • Devotee
  • *
  • Posts: 3458
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Incorporating changes from Standard
« Reply #76 on: February 01, 2020, 12:52:02 PM »
OK, I noticed that I was compiling your master branch instead of merge-from-standard120-1-3-fix
Regarding the pakset - which is the latest commit that I can use? The nightly is not usable, so I need to compile myself.

Offline Phystam

  • Devotee
  • *
  • Posts: 495
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: Incorporating changes from Standard
« Reply #77 on: February 01, 2020, 12:57:39 PM »
Which platform do you use? I can compile makeobj for only linux and the executable for linux/Windows both. If it works, I can provide it to you.

Offline Vladki

  • Devotee
  • *
  • Posts: 3458
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Incorporating changes from Standard
« Reply #78 on: February 01, 2020, 01:01:02 PM »
Linux 64-bit. If it is only about recompiling the pakset with the right makeobj, then it is no problem. I'll just need a windows client for other players to join.

Offline Phystam

  • Devotee
  • *
  • Posts: 495
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: Incorporating changes from Standard
« Reply #79 on: February 01, 2020, 01:04:42 PM »
You can download from Here.

Offline Vladki

  • Devotee
  • *
  • Posts: 3458
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Incorporating changes from Standard
« Reply #80 on: February 01, 2020, 01:07:54 PM »
I have compiled my own makeobj from your sources. I just need to know if I just have to compile the latest pakset sources with your makeobj, or do I need to use some older version of the pakset?

Offline Phystam

  • Devotee
  • *
  • Posts: 495
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: Incorporating changes from Standard
« Reply #81 on: February 01, 2020, 01:11:21 PM »
I did not touch any descriptor/writer codes, so you can use the old version directly (probably).

Offline Vladki

  • Devotee
  • *
  • Posts: 3458
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Incorporating changes from Standard
« Reply #82 on: February 01, 2020, 01:13:56 PM »
old version of what ? pakset or makeobj? I'm asking about which pakset version is compatible with your simutrans version

Offline Freahk

  • Devotee
  • *
  • Posts: 1336
  • Languages: DE, EN
Re: Incorporating changes from Standard
« Reply #83 on: February 01, 2020, 01:15:38 PM »
If I understand this correctly, any pakset sources compiled with the given makeobj should be compatible to that version of simutrans as dat files did not change.

Offline Phystam

  • Devotee
  • *
  • Posts: 495
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: Incorporating changes from Standard
« Reply #84 on: February 01, 2020, 01:17:50 PM »
The pakset compiled with Makeobj version 60.01 for simutrans 120.2.1 Extended Nightly development build 14.7 or lower.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20274
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Incorporating changes from Standard
« Reply #85 on: February 01, 2020, 02:57:46 PM »
Linux 64-bit. If it is only about recompiling the pakset with the right makeobj, then it is no problem. I'll just need a windows client for other players to join.

I should note that you will need a cross-compiled Windows client (or, at leas, one built with MinGW or similar), or clients will not be able to stay in sync.

Offline Vladki

  • Devotee
  • *
  • Posts: 3458
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Incorporating changes from Standard
« Reply #86 on: February 01, 2020, 04:38:04 PM »
Can you provide such build?

Offline Phystam

  • Devotee
  • *
  • Posts: 495
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: Incorporating changes from Standard
« Reply #87 on: February 01, 2020, 05:04:36 PM »
For Windows 64bit (mingw build): here ^^

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10243
  • Languages: De,EN,JP
Re: Incorporating changes from Standard
« Reply #88 on: February 02, 2020, 12:46:36 PM »
If there is a sync issue between MSVC and Mingw compilation, I highly suggest looking for the use of long as sint64 (because it remans and sint32 in MSVC).

Offline Phystam

  • Devotee
  • *
  • Posts: 495
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: Incorporating changes from Standard
« Reply #89 on: February 05, 2020, 08:44:03 AM »
Now I am trying to incorporate the following patch:
https://forum.simutrans.com/index.php/topic,16536.0.html
This patch moves the system colors to 16bit.
Almost all parts including the changes in Extended are replaced, but in some reason, simutrans cannot load the system colors from simuconf.tab, such as cursor color, window title bar color, etc.
I temporary pushed the current progress of the work to https://github.com/phystam/simutrans-extended/tree/merge-from-standard120-2-2

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20274
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Incorporating changes from Standard
« Reply #90 on: February 08, 2020, 08:24:54 PM »
Phystam - I should be grateful if you could check compatibility with this work and the master branch after the incorporation of the private car routing feature into the master branch.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20274
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Incorporating changes from Standard
« Reply #91 on: March 18, 2020, 12:15:47 AM »
Phystam - I should be grateful if you could check compatibility with this work and the master branch after the incorporation of the private car routing feature into the master branch.

Were you ever able to check this in the end? I do want to get this integrated if I can.

Offline Milko

  • Devotee
  • *
  • Posts: 868
Re: Incorporating changes from Standard
« Reply #92 on: April 14, 2020, 01:59:47 PM »

Hello

Does the nightly version already incorporate?

Giuseppe

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20274
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Incorporating changes from Standard
« Reply #93 on: April 15, 2020, 11:23:35 AM »
The current nightly version does not incorporate these latest changes, as I am awaiting confirmation that this does not conflict with the new private car routing and that this has been tested and is stable without loss of synchronisation in network mode.

Offline Phystam

  • Devotee
  • *
  • Posts: 495
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: Incorporating changes from Standard
« Reply #94 on: June 10, 2020, 08:08:42 AM »
I have merged the Standard changes upto 120.1.3 (r7753). There's no conflicts around the private car code.
 The conflicts are mainly the "headers" that show the license. It is Hajo's name removal.
Github branch: https://github.com/Phystam/simutrans-extended/tree/merge-from-standard120-1-3-fix

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20274
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Incorporating changes from Standard
« Reply #95 on: June 10, 2020, 04:46:13 PM »
Thank you for your work on this. I have merged this into my merge-from-standard-june-2020 branch, but I am afraid that I cannot compile this. In Visual Studio, I get the following errors:

Code: [Select]
Severity Code Description Project File Line Suppression State
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file dataobj\scenario.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 99
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file network\network_cmd_scenario.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 99
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_city.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 99
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_city.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 139
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_const.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_param.h 100
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_gui.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 99
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_gui.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 139
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_obj_desc.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 99
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_obj_desc.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 139
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_obj_desc.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_param.h 100
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_player.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_param.h 122
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_player.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 99
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_player.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 139
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_scenario.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 99
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_schedule.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 99
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_settings.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 99
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_simple.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_param.h 100
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_simple.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_param.h 144
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_tiles.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 99
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_tiles.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 53
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_world.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_param.h 122
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_world.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 99
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\api\api_world.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 139
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *' to 'const SQChar *' (compiling source file script\dynamic_string.cc) Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_function.h 99
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char *const ' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\api_param.cc 176
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [11]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 480
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [17]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 109
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [17]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 409
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [17]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 414
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [17]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 428
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [17]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 432
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [17]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 543
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [17]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 560
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [17]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 575
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [17]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 577
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [17]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 602
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [17]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 604
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [17]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 630
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [6]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 105
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [6]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 380
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [6]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 463
Error C2664 'void sq_pushstring(HSQUIRRELVM,const SQChar *,SQInteger)': cannot convert argument 2 from 'const char [7]' to 'const SQChar *' Simutrans-Extended C:\Users\James E. Petts\Documents\Development\Simutrans\simutrans-extended-sources\script\script.cc 101

Offline Phystam

  • Devotee
  • *
  • Posts: 495
  • Pak256.Ex developer
    • Pak256 wiki page
  • Languages: JP, EN, EO
Re: Incorporating changes from Standard
« Reply #96 on: June 12, 2020, 10:15:57 AM »
I can successfully compile it with my environment (mingw64 compiler). Since I do not have the visual studio environment, I cannot debug it...
the type SQChar is defined at sqconfig.h:104 in #else statement of #ifdef _WIN32. it seems that there is no path when compling with VS environment.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10243
  • Languages: De,EN,JP
Re: Incorporating changes from Standard
« Reply #97 on: June 12, 2020, 01:36:32 PM »
I compile standard all the time on MSVC, so this should work. Line 104 is compile on MSVC too.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20274
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Incorporating changes from Standard
« Reply #98 on: June 13, 2020, 11:11:35 AM »
I have looked into this a little further: the problem is complex and intractable. The definition in use is actually not the one at line no. 104 of sqconfic.h, but the one at line 58 of sqconfig.h, since SQUINCODE is defined at line 59 of squirrel.h.

This means that SQChar is actually defined as a wchar_t, which is, in turn, incompatible with all the places in the code which assume that it is a plain char type, for example, line 29 of api_include.cc. Changing const char* in that line to const wchar_t* prevents there from being a compile error in respect of that specific line, but many other compile errors remain.

Undefining SQUINCODE creates other errors and is thus also not the solution.

I do not understand how this code is intended to work, so I am not in a position to fix it within any reasonable amount of time. Does anyone who knows this code have a clearer idea of how this is supposed to work?

Offline Ranran

  • Devotee
  • *
  • Posts: 1226
  • Languages: ja
Re: Incorporating changes from Standard
« Reply #99 on: June 13, 2020, 11:21:37 AM »
Could it be the same reason I got stuck trying to compile standard on MSVC with extended's libraries?
I found that I was missing some libraries, so I added them, but there may be other differences.
After all, I didn't know the cause, so I gave up. (´・ω・`)

In the case of extended, the required library can be picked up from the James's repository, but in the case of standard, I didn't know.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10243
  • Languages: De,EN,JP
Re: Incorporating changes from Standard
« Reply #100 on: June 13, 2020, 12:52:29 PM »
Could it be that extended compile as wide char by default?

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 20274
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Incorporating changes from Standard
« Reply #101 on: June 13, 2020, 02:06:59 PM »
This does not look like a library problem, as these are compiler errors rather than linker errors. It may be that there is an incorrect version of a header file somewhere, but that is not quite the same,.

Offline Ranran

  • Devotee
  • *
  • Posts: 1226
  • Languages: ja
Re: Incorporating changes from Standard
« Reply #102 on: June 15, 2020, 11:15:58 AM »
I also tried to compile it, but got as many errors as james. However, copying the standard squirrel folder seems to greatly reduce errors ? (´・ω・`)
Code: [Select]
1>simview.obj : error LNK2019: 未解決の外部シンボル "public: __thiscall rect_t::rect_t(class koord,class koord)" (??0rect_t@@QAE@Vkoord@@0@Z) が関数 "public: void __thiscall main_view_t::display(bool)" (?display@main_view_t@@QAEX_N@Z) で参照されました。
1>gui_world_view_t.obj : error LNK2001: 外部シンボル ""public: __thiscall rect_t::rect_t(class koord,class koord)" (??0rect_t@@QAE@Vkoord@@0@Z)" は未解決です。
1>simview.obj : error LNK2019: 未解決の外部シンボル "public: __thiscall rect_t::~rect_t(void)" (??1rect_t@@QAE@XZ) が関数 "public: void __thiscall main_view_t::display(bool)" (?display@main_view_t@@QAEX_N@Z) で参照されました。
1>gui_world_view_t.obj : error LNK2001: 外部シンボル ""public: __thiscall rect_t::~rect_t(void)" (??1rect_t@@QAE@XZ)" は未解決です。
1>simworld.obj : error LNK2001: 外部シンボル ""public: __thiscall rect_t::~rect_t(void)" (??1rect_t@@QAE@XZ)" は未解決です。
1>simview.obj : error LNK2019: 未解決の外部シンボル "public: void __thiscall rect_t::mask(class rect_t const &)" (?mask@rect_t@@QAEXABV1@@Z) が関数 "public: void __thiscall main_view_t::display(bool)" (?display@main_view_t@@QAEX_N@Z) で参照されました。
1>gui_world_view_t.obj : error LNK2001: 外部シンボル ""public: void __thiscall rect_t::mask(class rect_t const &)" (?mask@rect_t@@QAEXABV1@@Z)" は未解決です。
1>simview.obj : error LNK2019: 未解決の外部シンボル "public: void __thiscall rect_t::discard_area(void)" (?discard_area@rect_t@@QAEXXZ) が関数 "public: void __thiscall main_view_t::clear_prepared(void)const " (?clear_prepared@main_view_t@@QBEXXZ) で参照されました。
1>gui_world_view_t.obj : error LNK2001: 外部シンボル ""public: void __thiscall rect_t::discard_area(void)" (?discard_area@rect_t@@QAEXXZ)" は未解決です。
1>simview.obj : error LNK2019: 未解決の外部シンボル "public: bool __thiscall rect_t::operator!=(class rect_t const &)const " (??9rect_t@@QBE_NABV0@@Z) が関数 "public: void __thiscall main_view_t::display(bool)" (?display@main_view_t@@QAEX_N@Z) で参照されました。
1>gui_world_view_t.obj : error LNK2001: 外部シンボル ""public: bool __thiscall rect_t::operator!=(class rect_t const &)const " (??9rect_t@@QBE_NABV0@@Z)" は未解決です。
1>viewport.obj : error LNK2019: 未解決の外部シンボル "public: __thiscall rect_t::rect_t(void)" (??0rect_t@@QAE@XZ) が関数 "public: __thiscall viewport_t::viewport_t(class karte_t *,class koord,short,short)" (??0viewport_t@@QAE@PAVkarte_t@@Vkoord@@FF@Z) で参照されました。
1>gui_world_view_t.obj : error LNK2001: 外部シンボル ""public: __thiscall rect_t::rect_t(void)" (??0rect_t@@QAE@XZ)" は未解決です。
1>simworld.obj : error LNK2001: 外部シンボル ""public: __thiscall rect_t::rect_t(void)" (??0rect_t@@QAE@XZ)" は未解決です。
1>export_objs.obj : error LNK2019: 未解決の外部シンボル "void __cdecl export_control(struct SQVM *)" (?export_control@@YAXPAUSQVM@@@Z) が関数 "void __cdecl register_export_function(struct SQVM *)" (?register_export_function@@YAXPAUSQVM@@@Z) で参照されました。
1>simworld.obj : error LNK2019: 未解決の外部シンボル "public: unsigned int __thiscall rect_t::fragment_difference(class rect_t const &,class rect_t * const,unsigned int)const " (?fragment_difference@rect_t@@QBEIABV1@QAV1@I@Z) が関数 "public: void __thiscall karte_t::prepare_tiles(class rect_t const &,class rect_t const &)" (?prepare_tiles@karte_t@@QAEXABVrect_t@@0@Z) で参照されました。
1>simworld.obj : error LNK2019: 未解決の外部シンボル "public: bool __thiscall rect_t::operator==(class rect_t const &)const " (??8rect_t@@QBE_NABV0@@Z) が関数 "public: void __thiscall karte_t::prepare_tiles(class rect_t const &,class rect_t const &)" (?prepare_tiles@karte_t@@QAEXABVrect_t@@0@Z) で参照されました。
1>.\simutrans\Simutrans-Extended-debug.exe : fatal error LNK1120: 9 件の未解決の外部参照

I also tried this but it had no effect.
https://git.k-4u.nl/koenk/openttd/-/commit/dcc2da107ac878b6852ead60377b09228d59d6fd

Offline Ranran

  • Devotee
  • *
  • Posts: 1226
  • Languages: ja
Re: Incorporating changes from Standard
« Reply #103 on: August 19, 2020, 03:15:46 PM »
I think it was stuck because it was difficult to understand the cause of the problem because it was carried out all at once.
I thought it would be worthwhile to move forward little by little, so I did it a bit. Because stopping for a long time again creates a lot of competition.

I'm using MSVC, so I might be able to proceed to where the previous problem occurred.

The branch is below.
https://github.com/Ranran-the-JuicyPork/simutrans-extended/tree/std-7556

The compilation completed successfully in my environment. However, the code check on github shows an error as follows. (´・ω・`)
https://github.com/Ranran-the-JuicyPork/simutrans-extended/runs/1003607665

Does anyone know about this issue?


EDIT:
I found some errors in Phystam's commit and fixed it. The compile error in my post above looks like the same. (simview error may be another issue)
« Last Edit: August 19, 2020, 03:57:44 PM by Ranran »

Offline Matthew

  • *
  • Posts: 420
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Re: Incorporating changes from Standard
« Reply #104 on: August 19, 2020, 03:56:54 PM »
The compilation completed successfully in my environment. However, the code check on github shows an error as follows. (´・ω・`)
https://github.com/Ranran-the-JuicyPork/simutrans-extended/runs/1003607665

Does anyone know about this issue?

I know nothing about C++ or Github Actions.

But it says that it is a code check and that it is looking for trailing whitespaces.

And all the "-" lines that I studied end with a trailing whitespace or are an empty line beginning with a tab:



These trailing whitespaces exist in Ranran's std-7556 branch, but not in James' master branch.

I guess that maybe it's because Windows line endings have been changed to Linux line endings or something similar???

Maybe you can just delete those trailing whitespaces and tabs in empty lines?