Compiled project(scripts) Windows/Linux

Hi,

I'm having a issue when executing compiled projects(scripts) between windows and linux.

I have a app that runs on windows and linux that compiles scripts/saves pcode from scripter projects and also loads and executes compiled projects and returns a result.

I have a project that works ok when compiled in linux/windows and then executed in windows/linux, everything here is Ok, but I have another project that does not work as previous one, Only works ok when compiled and executed on windows/linux. If I compile it in linux it only executes ok in linux and viceversa.

The error I get is the following "RUNTIME ERROR\r\nFile library R4000: Subroutine 'Global_InitSARAH' does not exist in script\r\nPosition: 0, 0"

  1. Global_InitSARAH is defined in a unit.
  2. Global_InitSARAH is actually called from the main unit.
  3. Unit R4000 does not call Global_InitSARAH procedure.
  4. Unit R4000 is not the main unit.

Any hints?

Thanks in advance,

Omar Zelaya

Maybe this info. can help
working project structure:
Main Use:
--------Unit1
--------Unit2 Use:
----------------Unit1
--------Unit3 Use:
----------------Unit1
--------Unit4 Use:
----------------Unit1

not wroking project structure:
Main Use:
--------Unit1
--------Unit2 Use:
----------------Unit1
----------------Unit3 Use:
------------------------Unit1
----------------Unit4(R4000) Use:
------------------------Unit1

Main Calls "Global_InitSARAH" procedure.
"Global_InitSARAH" procedure is defined in Unit1.

Thanks in advance,

Omar Zelaya

Hi,

When I compile in linux and execute in windows i get the "Subroutine does not exist" error, when I compile in windows and execute in Linux, I Get the following exception
""List index out of bounds (10). TList<System.Classes.TCollectionItem> range is 0..9" on the TatVirtualMachine.SolveAbsoluteAddressing method at line
AObject := FDefaultInstances[vInteger].Instance

Thanks in advance,

Omar Zelaya

"Compiled" scripts are only supposed to run in the application they were generated. Even if you change the application source code and recompile, for the same platform, there is a chance the script stops working. So it's not safe to do what you're trying to do.