[Lazarus] Why can Lazarus not find a file in the source dir?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Why can Lazarus not find a file in the source dir?

Free Pascal - Lazarus mailing list
I just copied over a project I have been working on in Windows using
Lazarus 2.0.8/FPC 3.0.4.
The "copy" was done through Subversion (commit in Windows, update in
Linux).

On Windows the project builds OK (but with incomplete code so it will
not yet work).
On Linux I get this error:

SSRemoteServerLx.lpr(36,3) Fatal: Cannot find class_SSremoteServer
used by SSRemoteServerLx of the Project Inspector.

SSRemoteServerLx is the project name and the lpr file name.

And the file class_SSremoteServer.pas opens just fine in the code
editor and it is located in the project source dir together with all
the other project files...

Why does Lazarus on Linux complain like this?
Note:
I started the project on Linux, then checked it in to SVN and out to
Windows, where I have spent a week on it. Now committed the changes
and went back to Linux only to find this strange error...

Since the file IS available in the source dir and since the Lazarus
code editor can find it I fail to understand why Lazarus complains
when I try to test build the code.

Can someone please suggest where to look for a solution?

Can case be involved in the file names vs. uses clauses?
I was under the assumption that Pascal/FPC/Lazarus are
case-insensitive...


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Why can Lazarus not find a file in the source dir?

Free Pascal - Lazarus mailing list
On Sat, 18 Jul 2020 22:17:03 +0200
Bo Berglund via lazarus <[hidden email]> wrote:

>[...]
> Can case be involved in the file names vs. uses clauses?
> I was under the assumption that Pascal/FPC/Lazarus are
> case-insensitive...

No, fpc searches on Linux mixed case, lower case, upper case.

Compile with -vt to find out what files fpc searches and finds.

Mattias
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Why can Lazarus not find a file in the source dir?

Free Pascal - Lazarus mailing list
On Sat, 18 Jul 2020 22:32:25 +0200, Mattias Gaertner via lazarus
<[hidden email]> wrote:

>On Sat, 18 Jul 2020 22:17:03 +0200
>Bo Berglund via lazarus <[hidden email]> wrote:
>
>>[...]
>> Can case be involved in the file names vs. uses clauses?
>> I was under the assumption that Pascal/FPC/Lazarus are
>> case-insensitive...
>
>No, fpc searches on Linux mixed case, lower case, upper case.

Do you mean that fpc treats class_SSremoteServer and
class_SSRemoteServer as different units?
Or do you mean it treats them as the same unit?

>Compile with -vt to find out what files fpc searches and finds.
>

It turns out that the problem was a case error after all. The message
was:

SSRemoteServerLx.lpr(36,3) Fatal: Cannot find class_SSremoteServer
used by SSRemoteServerLx of the Project Inspector.

And the actual file on disk was named class_SSRemoteServer.pas

After I changed he identifier in the uses clause from
class_SSremoteServer
to
class_SSRemoteServer

then Lazarus moved on to the next such typo which I could fix in the
same way...

So it looks like it is case sensitive on Linux...


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Why can Lazarus not find a file in the source dir?

Free Pascal - Lazarus mailing list
On Sun, 19 Jul 2020 00:00:30 +0200
Bo Berglund via lazarus <[hidden email]> wrote:

>[...]
> >No, fpc searches on Linux mixed case, lower case, upper case.  
>
> Do you mean that fpc treats class_SSremoteServer and
> class_SSRemoteServer as different units?
> Or do you mean it treats them as the same unit?

A bit of both. You cannot have both in the same program.
But FPC does not search any case on Linux, so you have to either use
lowercase filenames (like most Lazarus and FPC sources) or make sure
that all uses sections use the correct spelling.

 

> >Compile with -vt to find out what files fpc searches and finds.
> >  
>
> It turns out that the problem was a case error after all. The message
> was:
>
> SSRemoteServerLx.lpr(36,3) Fatal: Cannot find class_SSremoteServer
> used by SSRemoteServerLx of the Project Inspector.
>
> And the actual file on disk was named class_SSRemoteServer.pas
>
> After I changed he identifier in the uses clause from
> class_SSremoteServer
> to
> class_SSRemoteServer
>
> then Lazarus moved on to the next such typo which I could fix in the
> same way...
>
> So it looks like it is case sensitive on Linux...

That's why pas2js uses any case on Linux. It would be nice if FPC can
be told to do so as well.

Mattias

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus