[SOLVED] Not able to compile simple program using pas2js lazarus / 76-Pas2JS ---------------------------------------------------------------------- heejit · 2018-09-21 12:15 Lazaurs : 2.1 fpc        : 3.3.1 Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i file : b.pas program hello; begin  Writeln('Hello, world!');end. pas2js -vtb -Jc -Jirtl.js -Tbrowser b.pasInfo: Configfile search: /home/jiten/.pas2js.cfgInfo: Configfile search: /home/jiten/fpc- trunk/fpc/bin/x86_64-linux/pas2js.cfgInfo: Configfile search: /etc/pas2js.cfgInfo: output file: ""Info: Searching file: /home/jiten/System.pp... not foundInfo: Searching file: /home/jiten/System.pas... not foundInfo: Searching file: /home/jiten/System.p... not found/home/jiten/b.pas(3,6) Error: can't find unit "System"Fatal: Compilation abortedAn unhandled exception occurred at $00000000004A56A3:Exception:  $00000000004A56A3  $00000000004128DB ---------------------------------------------------------------------- jiutianfei · 2018-09-22 03:43 My ~/.pas2js.cfg contains this line: -Fu/home/jiutianfei/pas2js/packages/rtl That directory looks like this: browserconsole.pas   libjquery.pas   README.txt     sysutils.pas classes.pas        math.pas        rtlconsts.pas  types.pas contnrs.pas        nodejs.pas      rtti.pas       typinfo.pas dateutils.pas        objpas.pas      strutils.pas   webgl.pas hotreloadclient.pas  pas2js_rtl.lpk  system.js       web.pas js.pas           pas2js_rtl.pas  system.pas     webrouter.pp ---------------------------------------------------------------------- Thaddy · 2018-09-22 08:41 Indeed, the issue is you did not include the library path. Note with pas2js I prefer to do it like the above or create a custom fpjsc.cfg for that ---------------------------------------------------------------------- heejit · 2018-09-22 09:19 I dont have directory like pas2js/package I have installed fpc/lazarus trunk using fpcupdeluxe do I need to install anything else again ? ---------------------------------------------------------------------- heejit · 2018-09-22 09:33 I have installed pas2js-rtl from fpcupdeluxe Still same error After installing pas2js-rtl new cfg file created now there is new error after running following pas2js @fpc-trunk/fpc/bin/pas2js.cfg -vtb -Jc -Tbrowser b.pas Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Fatal: bug: uncaught Exception: Fatal: Exception: Fatal: Compilation abortedAn unhandled exception occurred at $00000000004A56A3:Exception:   $00000000004A56A3  $00000000004A630B  $00000000004A3072 ---------------------------------------------------------------------- Leledumbo · 2018-09-22 21:34 I'd say just get a prepackaged one from here. It looks like the one in fpc source folder is just the compiler, everything else is somewhere else. ---------------------------------------------------------------------- lucamar · 2018-09-22 21:50 Quote from: Leledumbo on September 22, 2018, 11:34:34 pmI'd say just get a prepackaged one from here. It looks like the one in fpc source folder is just the compiler, everything else is somewhere else. Corrected URI: ftp://ftpmaster.freepascal.org/fpc/contrib/pas2js/1.0.1/ ---------------------------------------------------------------------- heejit · 2018-09-22 22:45 Downloaded it is working from command line But now not working in Lazarus