Sign in Join

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

Mailing lists / fpc-devel / 2009-12

cpstrnew branch: Search path for 'cpid.pp' unit?

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

Working on the 'cpstrnew' branch. I got code page conversions working in the <XXX>to<YYY>Move functions - temporarily by hard-coding lookup values.

To remove the hard-coded lookups, I need to access the Encodings array defined in the compiler/cpid.pas unit from the rtl/unix/cwstring.pp unit, but if I include the cpid in the uses clause of the cwstring unit, the compiler complains when I try and compile the RTL - saying it can't find the cpid.pp unit.

How or where do I setup the search path to find the cpid.pas unit?

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Jonas Maebe
to Graeme Geldenhuys
Graeme Geldenhuys wrote
How or where do I setup the search path to find the cpid.pas unit?

You cannot use compiler units in the RTL. Either that unit (or part of it) has to be moved to the RTL, or the information has to be duplicated.

Jonas

Reply by email

Graeme Geldenhuys
to Jonas Maebe

2009/12/4 Jonas Maebe :

You cannot use compiler units in the RTL.

I thought this might be the answer.

Either that unit (or part of it) has to be moved to the RTL, or the information has to be duplicated.

This was going to be my next question. I actually think that unit is in the wrong location, and should be in the RTL. It's simply a lookup array for Code Page numbers to Cope Page names. Florian created it, but currently it is not referenced anywhere (I did a 'find in file' search) in the compiler code.

Florian, you care to comment?

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/

Reply by email