Sign in Join

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

Mailing lists / lazarus / 2012-10

How to include nxPascal: newby question

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Chavoux Luyt

Hi guys

How do I add the nxPascal directory (or other units (.pas files)) to the Lazarus source directory? I assumed that I had to add it to Tools->Options->Environment->Files->FPC Source Directory (or should it be added to the Lazarus directory instead?), but then it replaces the "/usr/share/fpcsrc/$(FPCVER)/" directory instead of adding nxPascal to the source path? The help file doesn't really say much more. I remember that I could add a project specific source path as well as an environment-wide source path in Delphi. In this case I want the nxPascal units to be available to all projects.

Thanks
Chavoux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121014/31aca95a/attachment-0001.html>

Reply by email

Mattias Gaertner
to Chavoux Luyt
Show quoted text 11 lines
Hi guys How do I add the nxPascal directory (or other units (.pas files)) to the Lazarus source directory? I assumed that I had to add it to Tools->Options->Environment->Files->FPC Source Directory (or should it be added to the Lazarus directory instead?), but then it replaces the "/usr/share/fpcsrc/$(FPCVER)/" directory instead of adding nxPascal to the source path? The help file doesn't really say much more. I remember that I could add a project specific source path as well as an environment-wide source path in Delphi. In this case I want the nxPascal units to be available to all projects.

Do you mean to all your projects or really to all projects?

Recommended way:
Create a package, add your shared sources and then add the package to any project that needs the units.

Another way, but can create conflicts:
Add the -Fu parameter to your /etc/fpc.cfg.

Mattias

Reply by email

Chavoux Luyt
to Mattias Gaertner

Thanks Mattias

Mattias Gaertner wrote 8 lines
On Sun, 14 Oct 2012 22:44:29 +0200 Chavoux Luyt wrote: > Hi guys > > How do I add the nxPascal directory (or other units (.pas files)) to the > Lazarus source directory?

<snip>

Do you mean to all your projects or really to all projects?

Sorry, I mean available to all my projects.

Show quoted text 5 lines
Recommended way: Create a package, add your shared sources and then add the package to any project that needs the units.

Ahh. I downloaded the nxPascal source files (all .pas units) and I don't think they are currently in a package. The demos that come with it has the .pas files in its uses clause... If I put them all in a package, how do I include the package in the demos (if it is not a visual component)?

Another way, but can create conflicts: Add the -Fu parameter to your /etc/fpc.cfg.

Should the Options menu item not read the options from and write them back to the /etc/fpc.cfg file?

Cheers
Chavoux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121015/1dd868fd/attachment.html>

Reply by email

stdreamer
to Chavoux Luyt
Chavoux Luyt wrote 30 lines
Thanks Mattias On 14 October 2012 23:04, Mattias Gaertner < <mailto:>> wrote: On Sun, 14 Oct 2012 22:44:29 +0200 Chavoux Luyt < <mailto:>> wrote: > Hi guys > > How do I add the nxPascal directory (or other units (.pas files)) to the > Lazarus source directory? <snip> Do you mean to all your projects or really to all projects? Sorry, I mean available to all my projects. Recommended way: Create a package, add your shared sources and then add the package to any project that needs the units. Ahh. I downloaded the nxPascal source files (all .pas units) and I don't think they are currently in a package. The demos that come with it has the .pas files in its uses clause... If I put them all in a package, how do I include the package in the demos (if it is not a visual component)?

You add the package as a dependency on your demo see the menu package\package inspector, press the big plus button on the left labeled "add" and select the second tab labeled "New Requirement". -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121015/cfcb371e/attachment.html>

Reply by email

Mattias Gaertner
to Chavoux Luyt: Thanks Mattias <snip> Sorry, I mean available to all my projects. Ahh. I downloaded the…

Chavoux Luyt hat am 15. Oktober 2012 um 00:28 geschrieben:

Show quoted text 5 lines
[...] > > Ahh. I downloaded the nxPascal source files (all .pas units) and I don't > > think they are currently in a package. The demos that come with it has > > the .pas files in its uses clause... If I put them all in a package, how > > do I include the package in the demos (if it is not a visual component)?

Like gstreamer wrote: via 'project inspector / add' or via 'package editor / use'.

> > Another way, but can create conflicts: > > Add the -Fu parameter to your /etc/fpc.cfg. > Should the Options menu item not read the options from and write them back > to the /etc/fpc.cfg file?

The /etc/fpc.cfg are the options for all users and all versions of fpc on your computer. Only root can alter that file.

Mattias

Reply by email