Hello !
I am creating a wcl treeview.
But JS unit uses pas2JS compiler.
I just want to verify compiling. But i must use FPC compiler for that.
Is there a compiling FPC project ?
Thanks !

Mailing lists / pas2js / 2021-11
17 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hello !
I am creating a wcl treeview.
But JS unit uses pas2JS compiler.
I just want to verify compiling. But i must use FPC compiler for that.
Is there a compiling FPC project ?
Thanks !
Matthieu GIROUX wroteHello ! I am creating a wcl treeview.
What is a wcl treeview ?
But JS unit uses pas2JS compiler. I just want to verify compiling. But i must use FPC compiler for that.
The JS unit will not compile with the FPC Compiler, it is meant specially for pas2js.
Why can you not verify compilation with pas2js directly ?
Michael.
Le 16/11/2021 à 15:53, Michael Van Canneyt a écrit :
WCL is Pas2JS Widget.
I use Lazarus. How can i do that ?
Follow the instructions here:
Install pas2js:
https://wiki.freepascal.org/pas2js
Integration with lazarus:
https://wiki.freepascal.org/lazarus_pas2js_integration
Simply create new web browser application, use your unit, and run the project in the browser.
Michael.
Le 16/11/2021 à 16:16, Michael Van Canneyt a écrit :
I do not get any debug message that can help me, even if i use terminal.
I have got only that :
Error: (lazarus) [TLazPackageGraph.CompileRequiredPackages] "Code de sortie 2"
Error: (lazarus) [TMainIDE.DoBuildProject]
PkgBoss.DoCompileProjectDependencies failed
I cannot get the line and instruction to debug.
[...] I cannot get the line and instruction to debug.
How did you install pas2js? Did you clone the git repo or did you download the release?
What Lazarus version are using?
Mattias
Le 16/11/2021 à 17:14, Mattias Gaertner a écrit :
I dowloaded the release.
I use Lazarus 2.2 RC2.
Le 16/11/2021 à 17:21, Michael Van Canneyt a écrit :
When i execute with no debug into Lazarus.
Le 16/11/2021 à 17:14, Mattias Gaertner a écrit : I dowloaded the release. I use…
:)
In the menu Tools / Options / Environment / Pas2js / Path of pas2js set the path to the pas2js of the release (
yourpath/bin/x86_64-linux/pas2js ).
And open the lpk file once using Package / Open package file yourpath/packages/rtl/pas2js_rtl.lpk
This way the IDE knows what pas2js_rtl.lpk to use.
Then your webapp should compile.
Mattias
Le 16/11/2021 à 18:44, Mattias Gaertner a écrit :
I linked to #HOME/pas2js/bin/x86_64-linux/pas2js.
I have opened #HOME/pas2js/packages/rtl/pas2js_rtl.lpk
I always get this error :
Error: (lazarus) [TLazPackageGraph.CompileRequiredPackages] "Code de sortie 2" Error: (lazarus) [TMainIDE.DoBuildProject] PkgBoss.DoCompileProjectDependencies failed
Le 16/11/2021 à 19:28, Matthieu GIROUX a écrit :
i got the -gl linking error on Lazarus.
The error i shown is in the terminal.
Le 16/11/2021 à 18:44, Mattias Gaertner a écrit : I linked to…
In the Messages window right to open popupmenu, then Save / Save All/Original messages to file.
Then post it here or to me.
Mattias
Le 17/11/2021 à 10:34, Mattias Gaertner a écrit :
It was always disabled. It does nothing new.
Have you checked if the -gl is in your pas2js.cfg?
Mattias
Le 17/11/2021 à 10:34, Mattias Gaertner a écrit : It was always disabled. It does…
Is it possible to send me the project files in private, so I can check if the project file is OK ?
Because normally, options like '-gl' should not appear in the command-line for a pas2js project.
Michael.
Problem solved:
The OP put the files in a package, some package options needed to be set correctly:
- IDE integration:
* Runtime, cannot be installed in IDE
* Never compile, only manually
* Add subdirs to unit dirs in package options.
- Compiler/Compile command:
* Check 'Skip calling compiler'
- Optionally, so compiling a package manually actually works: Execute before:
Command: $MakeExe(IDE,pas2js) -O- -Jc -vbq yourpackagename.pas Parsers: pas2js
Then it starts compiling the project (and optionally package) correctly.
These options should always be set for pas2js packges. You can find & copy the settings of the pas2js_rtl package, as a reference.
I will add a section to the WIKI about creating pas2js packages.
Michael.
Is it possible to send me the project files in private, so I can check if the project…
Hint: To find out if it comes from the project options or from some used package, open Project / Project Options / bottom button "Show Options". See Inherited parameters.
Mattias