Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / pas2js / 2021-11

I would like to get JS units substitutes to compile my wcl treeview

17 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt
to Matthieu GIROUX
Matthieu GIROUX wrote
Hello ! 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.

Reply by email

Matthieu GIROUX
to Michael Van Canneyt

Le 16/11/2021 à 15:53, Michael Van Canneyt a écrit :

Show quoted text 9 lines
On Tue, 16 Nov 2021, Matthieu GIROUX wrote: > Hello ! > > I am creating a wcl treeview. What is a wcl treeview ?

WCL is Pas2JS Widget.

Show quoted text 9 lines
> 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 ?

I use Lazarus. How can i do that ?

Show quoted text 5 lines
Michael. _______________________________________________ Pas2js maillist  -  https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js
LIBERLOG - Édition de livres de coaching et de logiciels 13 Rue François Tanguy PRIGENT A.15 - 35000 RENNES Tél : 02 23 46 06 54 - Numéro vert : 06 44 733 008 https://www.agoravox.tv/auteur/matthius https://liberlog.fr https://www.ancestromania.be

Reply by email

Michael Van Canneyt
to Matthieu GIROUX
Matthieu GIROUX wrote 22 lines
Le 16/11/2021 à 15:53, Michael Van Canneyt a écrit : > > > On Tue, 16 Nov 2021, Matthieu GIROUX wrote: > >> Hello ! >> >> I am creating a wcl treeview. > > What is a wcl treeview ? WCL is Pas2JS Widget. > >> 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 ? 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.

Reply by email

Matthieu GIROUX
to Michael Van Canneyt

Le 16/11/2021 à 16:16, Michael Van Canneyt a écrit :

Show quoted text 13 lines
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.

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.

LIBERLOG - Édition de livres de coaching et de logiciels 13 Rue François Tanguy PRIGENT A.15 - 35000 RENNES Tél : 02 23 46 06 54 - Numéro vert : 06 44 733 008 https://www.agoravox.tv/auteur/matthius https://liberlog.fr https://www.ancestromania.be

Reply by email

Matthieu GIROUX
to Mattias Gaertner

Le 16/11/2021 à 17:14, Mattias Gaertner a écrit :

Show quoted text 7 lines
On Tue, 16 Nov 2021 16:49:57 +0100 Matthieu GIROUX wrote: > [...] > 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?

I dowloaded the release.

Show quoted text 5 lines
What Lazarus version are using? Mattias

I use Lazarus 2.2 RC2.

LIBERLOG - Édition de livres de coaching et de logiciels 13 Rue François Tanguy PRIGENT A.15 - 35000 RENNES Tél : 02 23 46 06 54 - Numéro vert : 06 44 733 008 https://www.agoravox.tv/auteur/matthius https://liberlog.fr https://www.ancestromania.be

Reply by email

Matthieu GIROUX

Le 16/11/2021 à 17:21, Michael Van Canneyt a écrit :

Show quoted text 12 lines
> 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 When exactly do you get this ? Michael.

When i execute with no debug into Lazarus.

LIBERLOG - Édition de livres de coaching et de logiciels 13 Rue François Tanguy PRIGENT A.15 - 35000 RENNES Tél : 02 23 46 06 54 - Numéro vert : 06 44 733 008 https://www.agoravox.tv/auteur/matthius https://liberlog.fr https://www.ancestromania.be -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20211116/24391946/attachment-0001.htm>

Reply by email

Mattias Gaertner
to Matthieu GIROUX: Le 16/11/2021 à 17:14, Mattias Gaertner a écrit : I dowloaded the release. I use…
Show quoted text 12 lines
Le 16/11/2021 à 17:14, Mattias Gaertner a écrit : > On Tue, 16 Nov 2021 16:49:57 +0100 > Matthieu GIROUX wrote: > >> [...] >> 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? I dowloaded the release. > What Lazarus version are using? [...] > I use Lazarus 2.2 RC2.

:)

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

Reply by email

Matthieu GIROUX
to Mattias Gaertner

Le 16/11/2021 à 18:44, Mattias Gaertner a écrit :

Show quoted text 16 lines
> > [...] > > I use Lazarus 2.2 RC2. :) 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

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

LIBERLOG - Édition de livres de coaching et de logiciels 13 Rue François Tanguy PRIGENT A.15 - 35000 RENNES Tél : 02 23 46 06 54 - Numéro vert : 06 44 733 008 https://www.agoravox.tv/auteur/matthius https://liberlog.fr https://www.ancestromania.be

Reply by email

Matthieu GIROUX
to Matthieu GIROUX

Le 16/11/2021 à 19:28, Matthieu GIROUX a écrit :

Show quoted text 29 lines
Le 16/11/2021 à 18:44, Mattias Gaertner a écrit : >> >> [...] > >> I use Lazarus 2.2 RC2. > :) > > 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 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

i got the -gl linking error on Lazarus.

The error i shown is in the terminal.

LIBERLOG - Édition de livres de coaching et de logiciels 13 Rue François Tanguy PRIGENT A.15 - 35000 RENNES Tél : 02 23 46 06 54 - Numéro vert : 06 44 733 008 https://www.agoravox.tv/auteur/matthius https://liberlog.fr https://www.ancestromania.be

Reply by email

Mattias Gaertner
to Matthieu GIROUX: Le 16/11/2021 à 18:44, Mattias Gaertner a écrit : I linked to…
Show quoted text 27 lines
Le 16/11/2021 à 18:44, Mattias Gaertner a écrit : >> >> [...] > >> I use Lazarus 2.2 RC2. > :) > > 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 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

In the Messages window right to open popupmenu, then Save / Save All/Original messages to file.
Then post it here or to me.

Mattias

Reply by email

Matthieu GIROUX

Le 17/11/2021 à 10:34, Mattias Gaertner a écrit :

Show quoted text 7 lines
"Fatal: parameter -gl: unknown parameter "-gl". Use -h for help." Disable in Project Options / Compiler Options / Debugging / Generate Info for debugging Mattias

It was always disabled. It does nothing new.

LIBERLOG - Édition de livres de coaching et de logiciels 13 Rue François Tanguy PRIGENT A.15 - 35000 RENNES Tél : 02 23 46 06 54 - Numéro vert : 06 44 733 008 https://www.agoravox.tv/auteur/matthius https://liberlog.fr https://www.ancestromania.be

Reply by email

Mattias Gaertner
to Matthieu GIROUX
Show quoted text 10 lines
Le 17/11/2021 à 10:34, Mattias Gaertner a écrit : > "Fatal: parameter -gl: unknown parameter "-gl". Use -h for help." > > > Disable in Project Options / Compiler Options / Debugging / Generate > Info for debugging > > Mattias It was always disabled. It does nothing new.

Have you checked if the -gl is in your pas2js.cfg?

Mattias

Reply by email

Michael Van Canneyt
to Matthieu GIROUX: Le 17/11/2021 à 10:34, Mattias Gaertner a écrit : It was always disabled. It does…
Matthieu GIROUX wrote 10 lines
Le 17/11/2021 à 10:34, Mattias Gaertner a écrit : > "Fatal: parameter -gl: unknown parameter "-gl". Use -h for help." > > > Disable in Project Options / Compiler Options / Debugging / Generate > Info for debugging > > Mattias It was always disabled. It does nothing new.

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.

Reply by email

Michael Van Canneyt
to Michael Van Canneyt
Michael Van Canneyt wrote 20 lines
On Wed, 17 Nov 2021, Matthieu GIROUX wrote: > Le 17/11/2021 à 10:34, Mattias Gaertner a écrit : >> "Fatal: parameter -gl: unknown parameter "-gl". Use -h for help." >> >> >> Disable in Project Options / Compiler Options / Debugging / Generate >> Info for debugging >> >> Mattias > > It was always disabled. It does nothing new. 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.

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.

Reply by email

Mattias Gaertner
to Michael Van Canneyt: Is it possible to send me the project files in private, so I can check if the project…
Show quoted text 18 lines
On Wed, 17 Nov 2021, Matthieu GIROUX wrote: > Le 17/11/2021 à 10:34, Mattias Gaertner a écrit : >> "Fatal: parameter -gl: unknown parameter "-gl". Use -h for help." >> >> >> Disable in Project Options / Compiler Options / Debugging / >> Generate Info for debugging >> >> Mattias > > It was always disabled. It does nothing new. 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.

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

Reply by email