Sign in Join

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

Mailing lists / lazarus / 2008-11

using two versions of RTL from lazarus

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Marc Santhoff

Hi,

I'd like to use two version of the fpc libraries from inside lazarus, one RTL for release/normal usage and another one compiled with debugging symbols included.

How can I use lazarus to switch between those two?

TIA,
Marc

Reply by email

Henry Vermaak
to Marc Santhoff

2008/11/9 Marc Santhoff :

Show quoted text 7 lines
Hi, I'd like to use two version of the fpc libraries from inside lazarus, one RTL for release/normal usage and another one compiled with debugging symbols included. How can I use lazarus to switch between those two?

easiest is probably to install the ppu files to different locations, then invent a custom define and add it to your fpc.cfg to switch between different versions (where the -Fu paths are defined).

you don't really need to do this if you are just worried about debug info, since you can strip the debug info afterwards.

henry

Reply by email

Marc Santhoff
to Henry Vermaak
Henry Vermaak wrote 15 lines
2008/11/9 Marc Santhoff : > Hi, > > I'd like to use two version of the fpc libraries from inside lazarus, > one RTL for release/normal usage and another one compiled with debugging > symbols included. > > How can I use lazarus to switch between those two? easiest is probably to install the ppu files to different locations, then invent a custom define and add it to your fpc.cfg to switch between different versions (where the -Fu paths are defined). you don't really need to do this if you are just worried about debug info, since you can strip the debug info afterwards.

I see, so having the RTL and stuff carrying debug info is okay since stripping will remove this overhad, too.

Very nice, I hope it'll help me. ;)

Thanks again,
Marc

Reply by email

Florian Klaempfl
to Henry Vermaak: 2008/11/9 Marc Santhoff : easiest is probably to install the ppu files to different…
Show quoted text 8 lines
> How can I use lazarus to switch between those two? easiest is probably to install the ppu files to different locations, then invent a custom define and add it to your fpc.cfg to switch between different versions (where the -Fu paths are defined). you don't really need to do this if you are just worried about debug info, since you can strip the debug info afterwards.

This is not completetly true, when debugging it's also better to turn the optimizer off to get better results.

Reply by email

Martin
to Florian Klaempfl
Florian Klaempfl wrote 15 lines
Henry Vermaak schrieb: >> How can I use lazarus to switch between those two? >> > easiest is probably to install the ppu files to different locations, > then invent a custom define and add it to your fpc.cfg to switch > between different versions (where the -Fu paths are defined). > > you don't really need to do this if you are just worried about debug > info, since you can strip the debug info afterwards. > This is not completetly true, when debugging it's also better to turn the optimizer off to get better results.

Another option, not perfect, but doanle, is to use --primary-config-path You could have to shortcuts / two startup scripts, passing a diff config directory to lazarus. Each would have one of the rtl-path in it's enviroment conf.

It does mean to restart lazarus, in order to build releases (or start a 2nd instance).

Alternatively, you may be able to swap you fpc.cfg file, while lazarus is running, the next compile should pick up the new config.

Regards
Martin

Reply by email

Marc Santhoff
to Martin
Martin wrote 15 lines
Florian Klaempfl wrote: > Henry Vermaak schrieb: > >>> How can I use lazarus to switch between those two? >>> >> easiest is probably to install the ppu files to different locations, >> then invent a custom define and add it to your fpc.cfg to switch >> between different versions (where the -Fu paths are defined). >> >> you don't really need to do this if you are just worried about debug >> info, since you can strip the debug info afterwards. >> > > This is not completetly true, when debugging it's also better to turn > the optimizer off to get better results.

I remember a switch definition for compiling releases in fpg.cfg ...

Show quoted text 10 lines
Another option, not perfect, but doanle, is to use --primary-config-path You could have to shortcuts / two startup scripts, passing a diff config directory to lazarus. Each would have one of the rtl-path in it's enviroment conf. It does mean to restart lazarus, in order to build releases (or start a 2nd instance). Alternatively, you may be able to swap you fpc.cfg file, while lazarus is running, the next compile should pick up the new config.

... together with this remark it makes an idea.

I'll try do use some conditionals inside my fpc.cfg, although I'm not sure where to find documentation on this topic someone here or on the fpc list showed an example some time ago (regarding compiler versions IIRC).

Thank you all,
Marc

Reply by email

Marc Santhoff
to Marc Santhoff
Marc Santhoff wrote
I'll try do use some conditionals inside my fpc.cfg, although I'm not sure where to find documentation on this topic someone here or on the fpc list showed an example some time ago (regarding compiler versions IIRC).

Replying to myself:

The docs are in the users guide. :)

Marc

Reply by email