The version option was added last year in trunk (see commit) so you would have to download the sources from trunk and compile it manually to create the (correct) executable.
Thank you,
I used
fpcupdeluxe-x86_64-win64.exe and compiled fpc trunk(lazarus failed see below), I then compiled
C:\fpcupdeluxe\fpcsrc\packages\fcl-web\examples\simpleserver using lazarus 3 ide i download from the web. Had to change lazarus Tools > Options > Env, compiler to
C:\fpcupdeluxe\fpc\bin\x86_64-win64\fpc.exe and fpc source to
C:\fpcupdeluxe\fpcsrc\.
Now I can run "Web Browser Application from New Project".
I had another problem,
c:\prj\pas>pas2js -Jc -Jirtl.js -Tbrowser astar.js
astar.js(1,4) Error: can't find unit "System"
Fatal: Compilation aborted
I added
-vt to pas2js for more verbose config debugging and realised the
pas2js.cfg is broken for package directory using unix pathing(/) instead of windows pathing(\), changed:
#IFDEF FPC_SUBTARGET_NAMESPACED
-Fu$CfgDir\..\..\packages/*/*/namespaced
-Fi$CfgDir\..\..\packages/*/*/src
#else
-Fu$CfgDir\..\..\packages/*/*/srcTo
#IFDEF FPC_SUBTARGET_NAMESPACED
-Fu$CfgDir\..\..\packages\*\namespaced
-Fi$CfgDir\..\..\packages\*\src
#else
-Fu$CfgDir\..\..\packages\*\src
Enabling me to compile the
pas2js trunk demo's and the
stackoverflow astar.pas example(running on
jsfiddle).
C:/fpcupdeluxe/fpc/bin/x86_64-win64/fpc.exe -MObjFPC -Scghi -O1 -g -gl -l -venibq -vw-h- -vm6058,3057 -Fu. -Fu../../packager/units/x86_64-win64 -Fu../lazdebuggers/lazdebuggerintf/lib/x86_64-win64 -Fu../lazutils/lib/x86_64-win64 -Fu../debuggerintf/lib/x86_64-win64 -Fu../freetype/lib/x86_64-win64 -Fu../../lcl/units/x86_64-win64 -FuC:/fpcupdeluxe/fpcsrc/rtl -FE. -FUlib/x86_64-win64 -vw-n-h-l-d-u-t-p-c- -g -gl -dx86_64 fpdebug.pas
(1002) Target OS: Win64 for x64
(3104) Compiling fpdebug.pas
(3104) Compiling fpdbgclasses.pp
(3104) Compiling fpdbgutil.pp
C:\fpcupdeluxe\lazarus\components\fpdebug\fpdbgutil.pp(115,52) Error: (4003) Type identifier expected
C:\fpcupdeluxe\lazarus\components\fpdebug\fpdbgutil.pp(115,52) Error: (4009) Class type expected, but got "<erroneous type>"
C:\fpcupdeluxe\lazarus\components\fpdebug\fpdbgutil.pp(116,16) Error: (3058) There is no method in an ancestor class to be overridden: "PushItem(const TFpThreadWorkerItem):System.Boolean;"
C:\fpcupdeluxe\lazarus\components\fpdebug\fpdbgutil.pp(229,1) Fatal: (10026) There were 3 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: C:\fpcupdeluxe\fpc\bin\x86_64-win64\ppcx64.exe returned an error exitcode
make.exe[1]: *** [lazbuildlclpackages] Error 2
C:\fpcupdeluxe\fpcbootstrap\make.exe: *** [lazbuild] Error 2
fpcupdeluxe: ERROR: Lazarus Native Installer (BuildModuleCustom: Lazbuild): make.exe returned exit status #2.
You are aware the compiler itself can run as cgi? You only need to provide an interface.
No, want to give a example? Was just following the docs on pas2js on the wiki,