Sign in Join

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

Mailing lists / lazarus / 2003-06

Filename case problem...

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Tom Lisjac

I decided to give Synapse a try to see how how much of a porting challenge it would be. I'm still working on it... but in the process I ran into another problem that I thought might be worth mentioning.

All the Synapse units have mixed case filenames. I was able to add SynaUtil.pas with the "Add active unit to project".. but trying to compile produced the error "Can't find unit SYNAUTIL". Renaming the file on disk to synautil.pas got past the error... so it looks like the added unit's filename was folded to lower case somewhere in the IDE.

-Tom

Reply by email

Peter Vreman
to Tom Lisjac
you wrote 9 lines
I decided to give Synapse a try to see how how much of a porting challenge it would be. I'm still working on it... but in the process I ran into another problem that I thought might be worth mentioning. All the Synapse units have mixed case filenames. I was able to add SynaUtil.pas with the "Add active unit to project".. but trying to compile produced the error "Can't find unit SYNAUTIL". Renaming the file on disk to synautil.pas got past the error... so it looks like the added unit's filename was folded to lower case somewhere in the IDE.

You need the 1.1 compiler for mixed case filenames.

Peter

Reply by email

Tom Lisjac
to Tom Lisjac: I decided to give Synapse a try to see how how much of a porting challenge it would be.…
Maybe we should add an option "Auto rename lowercase". And before compilation, the IDE checks and asks the user to rename all project units.

I wonder if it's worth adding code if this issue will be going away with the 1.1 compiler? Another approach might be to add a line to the "Can't find unit xxx" error message with something like: "Hint: 1.0.x compilers only support lower case filenames". If that message had come up, I would have just grinned, renamed all the files and kept on debugging. :)

Thanks for the information... I'll keep filename case in mind as I plow through my DSP archives!

-Tom

Reply by email

Mattias Gaertner
to Tom Lisjac: I decided to give Synapse a try to see how how much of a porting challenge it would be.…
Show quoted text 11 lines
At 06:41 8-6-2003, you wrote: >I decided to give Synapse a try to see how how much of a porting >challenge it would be. I'm still working on it... but in the process I >ran into another problem that I thought might be worth mentioning. > >All the Synapse units have mixed case filenames. I was able to add >SynaUtil.pas with the "Add active unit to project".. but trying to >compile produced the error "Can't find unit SYNAUTIL". Renaming the file >on disk to synautil.pas got past the error... so it looks like the added >unit's filename was folded to lower case somewhere in the IDE.

The 1.0.x compiler only searches lowercase.

You need the 1.1 compiler for mixed case filenames.

The IDE also searches same case and lowercase.
That's why the IDE has a naming scheme (Environment -> Environment Options -> Naming). Normally lazarus saves all new units lowercase and keeps the nice name in the source. It does not change any existing unit. Maybe we should add an option "Auto rename lowercase". And before compilation, the IDE checks and asks the user to rename all project units.

Mattias

Reply by email