[Pas2js] How I use de Linklib?

Michael Van Canneyt michael at freepascal.org
Tue Apr 25 08:23:18 CEST 2023



On Mon, 24 Apr 2023, Henrique Gottardi Werlang via Pas2js wrote:

> I trying the linklib directive, and the import don’t apper in the JS file.
>
> I tried like this
>
> {$linklib MyLibFile.js MyLib}
>

Imports only work in modules in the browser, or in NodeJS.

So Linklib only works when the target is module or nodejs. Assuming you work
in the browser, did you set -Tmodule ?

Michael.


More information about the Pas2js mailing list