Hello Michael and Tim.
Ok, you have convinced me.
But sad that the most beautiful things are always the least trustworthy.
> Do you make software to "play" and keep yourself busy, or do you want to
> get to business and do something useful?
I make software for business and open-source. But lot
On 15 Feb 2017 04:47, Michael Van Canneyt wrote:
>
>
>
> On Tue, 14 Feb 2017, fredvs wrote:
>
> >> Please simply use "{$unitpath }"
> >
> > Huh, Mattias present me yesterday a beautiful "{$unitpath }".
> >
> > We played together all the night, without any trouble.
On Tue, 14 Feb 2017, fredvs wrote:
Please simply use "{$unitpath }"
Huh, Mattias present me yesterday a beautiful "{$unitpath }".
We played together all the night, without any trouble.
And this morning Matt said that I may not trust in {$unitpath }, that I will
only have problems, that I
> Please simply use "{$unitpath }"
Huh, Mattias present me yesterday a beautiful "{$unitpath }".
We played together all the night, without any trouble.
And this morning Matt said that I may not trust in {$unitpath }, that I will
only have problems, that I should think at something else. ;-(
>
Oops, in previous mail, please read:
... -Fu../src ...in place of... -Fumyunit ...
Fre;D
-
Many thanks ;-)
--
View this message in context:
http://free-pascal-general.1045716.n5.nabble.com/uses-myunit-in-src-myunit-pas-tp5727626p5727668.html
Sent from the Free Pascal - General mailing
On Tue, 14 Feb 2017, fredvs wrote:
I hope that I will not annoy you anymore (but where to ask then).
On the contrary; I found it quite amusing. ;)
Yep, thanks Tim, I feel better now, I will continue to amuse you (and
Michael too, see follow) ;-)
... embarking on a mission to request a
>> I hope that I will not annoy you anymore (but where to ask then).
> On the contrary; I found it quite amusing. ;)
Yep, thanks Tim, I feel better now, I will continue to amuse you (and
Michael too, see follow) ;-)
> ... embarking on a mission to request a compiler extension. No more, no
>
On Tue, 14 Feb 2017, fredvs wrote:
Your remark shows how hard you looked for it.
Is it the war ?
No.
It just means I established you didn't look in the documentation before
embarking on a mission to request a compiler extension. No more, no less.
When I learn new tools, I always read
Am 2017-02-14 um 16:02 schrieb Tim Veldhuizen:
On 14/02/17 20:00, fredvs wrote:
It is a difficult task to speak with gurus.
Nah, it's not. They are also people... I think.. Actually, I've never seen
proof that they all are, so some may actually be chimps. :)
Anyway, some are standing on such
On 14/02/17 20:00, fredvs wrote:
It is a difficult task to speak with gurus.
Nah, it's not. They are also people... I think.. Actually, I've never
seen proof that they all are, so some may actually be chimps. :)
Anyway, some are standing on such a high pedestal that they feel
everyone is
> Your remark shows how hard you looked for it.
Is it the war ?
I never imagined that such local and global directives to define path of
units could exist.
In my mind, it was not possible that fpc could read units without that the
path was defined before all.
So only a fpc parameter could be
On Mon, 13 Feb 2017, fredvs wrote:
I guess you are searching for {$unitpath Documents}
Yes, it is a excellent solution.
but then some units might not rebuild automatically,
It is not a problem, all that units are part of ../src and users should not
touch it when compiling demos.
Many
On 2017-02-13 22:02, fredvs wrote:
> PS: I wish that one day fpc will publish the complete list of all the
> {$something ...} that fpc can deal.
There has always been one for local and global directives. Take a look
at the official "Programmers Guide" PDF and see section 1.2 (Local
Directives)
> Even my name is written wrong.
Sorry Mattias, really.
I should use a other way to dialog, I agree it was not fun.
And I will not use directive inside code (even if it is very wow).
For close the débat, the "$UNITPATH" way works only if you add this on the
used units:
for example in the
On Mon, 13 Feb 2017 16:47:38 -0700 (MST)
fredvs wrote:
>[...]
> This works (Mathias way):
That's not my way. In my opinion you should not put paths into Pascal
sources and the directive should be disabled in units.
>[...]
> Congratulation Mathias, you come late, but you
> You mean a duplicate of this page
;-)
Excellent, thanks.
To resume:
This works (Michael way):
program p;
uses
unita2 in 'Documents/unita2.pp',
unita in 'Documents/unita.pp';
begin
end.
-
This works (Mathias way):
program p;
On 2/13/2017 2:02 PM, fredvs wrote:
I guess you are searching for {$unitpath Documents}
Yes, it is a excellent solution.
but then some units might not rebuild automatically,
It is not a problem, all that units are part of ../src and users should not
touch it when compiling demos.
Many
> I guess you are searching for {$unitpath Documents}
Yes, it is a excellent solution.
> but then some units might not rebuild automatically,
It is not a problem, all that units are part of ../src and users should not
touch it when compiling demos.
Many thanks Mathias for this pearl.
PS: I
> unita2 can be anywhere.
No, if the compiler assign the directory search path, like I explained in
earlier post:
-
...
if fpcword = 'in' then begin
...
IncludeDirectorySearchPath(ExtractFilePath('/thepath/src/myunit.pas')); //
This could be added
On Mon, 13 Feb 2017 09:34:09 -0700 (MST)
fredvs wrote:
> > The compiler already does this.
> Yes, that I know, for one unit, but try this:
I guess you are searching for {$unitpath Documents}
The problem with this directive is that it only works correct in the
program. FPC
On Mon, 13 Feb 2017, fredvs wrote:
The compiler already does this.
Yes, that I know, for one unit, but try this:
That will not work, and it should not.
unita2 can be anywhere.
The compiler should not assume that the one in the Documents directory is the
one you want.
I just checked: I
> The compiler already does this.
Yes, that I know, for one unit, but try this:
---
cadwal: >cat p.pp
program p;
uses unita in 'Documents/unita.pp';
begin
end.
cadwal: >cat Documents/unita.pp
unit unita;
uses unita2;
interface
implementation
end.
> It does. See the output I sent. Tested with fpc trunk.
Ha, you just fixed now... ;-)
OK, I will try with trunk.
Thanks Michael.
Fre;D
-
Many thanks ;-)
--
View this message in context:
> Why would you copy functionality that the OS provides out of the box ?
I profit that you are here Michael !
Not everybody knows perfectly his os.
Dealing with dynamically libraries helps to not oblige end-users to copy
files into root-protected-directories.
But, like explained, if that
On Mon, 13 Feb 2017, fredvs wrote:
The compiler already does this.
Huh, then..., sorry, but there is a bug, it does not work. :-(
It does. See the output I sent. Tested with fpc trunk.
The 'in' construct was/is a serious contender for "the worst idea ever" of
Borland.
If "the
> The compiler already does this.
Huh, then..., sorry, but there is a bug, it does not work. :-(
> The 'in' construct was/is a serious contender for "the worst idea ever" of
> Borland.
If "the compiler already does this" (adding the path of the unit into the
search-path list), IMO, the use of
But thinking that the compiler itself will automagically determine the
path: that's simply not realistic.
Really ?
When the compiler reads uses section and find a "in" like here :
uses myunit in '/thepath/src/myunit.pas';
He could do something like:
...
if fpcword = 'in' then begin
Hello Graeme.
OK, thanks, I will take a look.
@Michael:
>I don't see the point at all.
I will show you later TLoadlibrary(), maybe you will see better then.
Huh, and what about: ?
>> But thinking that the compiler itself will automagically determine the
>> path: that's simply not realistic.
On 2017-02-12 18:25, fredvs wrote:
> Yes, of course it could be a solution but I would prefer something inside
> the code.
AggPas (also included with fpGUI) has a build system where relative
paths can be defined as code comments in the top of the program unit.
Relative paths are relative to the
On Sun, 12 Feb 2017, fredvs wrote:
For example, TProcess also is very os dependent and it uses
"environnement"
parameter (that is also very os dependent).
No it is not. Every OS has an environment ?
So it is exactly what I propose:
a TLoadLibrary with some features adapted for
>> For example, TProcess also is very os dependent and it uses
"environnement"
>> parameter (that is also very os dependent).
> No it is not. Every OS has an environment ?
So it is exactly what I propose:
a TLoadLibrary with some features adapted for libraries that TProcess uses
for
> But thinking that the compiler itself will automagically determine the
path: that's simply not realistic.
Really ?
When the compiler reads uses section and find a "in" like here :
uses myunit in '/thepath/src/myunit.pas';
He could do something like:
...
if fpcword = 'in' then begin
On Sun, 12 Feb 2017, fredvs wrote:
Loading libraries is handled by the OS, not by the compiler or the RTL
and every OS has its own way to deal with dependencies.
Yes but the compiler could give some command to the os too...
Of course every OS has its own way to deal with dependencies but
> Loading libraries is handled by the OS, not by the compiler or the RTL
> and every OS has its own way to deal with dependencies.
Yes but the compiler could give some command to the os too...
Of course every OS has its own way to deal with dependencies but that is the
power of fpc, he knows
On 12.02.2017 19:25, fredvs wrote:
> For example, fpc can load dynamically libraries but it is not usable if that
> libraries depend on other libraries.
>
> It would be great (IMO) if fpc provide, unlike other compilers, some more
> modern ways to use things (units, libraries, etc...) with the
> Why is using -Fu hard?
Yes, of course it could be a solution but I would prefer something inside
the code.
By the way, IMO, and it is valable for lot of languages, the way to
define/use the path (of units or libraries or dependencies) is very archaic.
Only LD_LIBRARY_PATH for libraries and
In our previous episode, Mattias Gaertner said:
> > > ../someunit instead of configuring -Fu which can be obnoxious and
> > > tedious.. But that's just one use case. Another use case, AFAIR was a
> > > build system instead of gnu make.
> >
> > IMHO these are all shaky uses cases, and
On Sun, 12 Feb 2017 16:17:01 +0100 (CET)
mar...@stack.nl (Marco van de Voort) wrote:
>[...]
> > One example might be when you are writing a quick program and don't want
> > to send in a whole bunch of -Fu options and go into dialog boxes in
> > lazarus configuring it, so you just quickly write
In our previous episode, Lars said:
> I have found some use cases for hard coded paths in the source files..
> although these use cases are rare. I think even delphi main project DPR
> file does this, if I remember correctly, but I found other uses cases
> other than that.
I think that is the
On Sun, 12 Feb 2017 15:33:23 +0800
Tim Veldhuizen wrote:
> Indeed, I can confirm Delphi does this. I think since 2009 or XE or so,
> but AFAIK it doesn't need to. It does it only for the files that are
> explicitly added to the project, but those are also in the dproj
On 2017-02-12 01:33, Tim Veldhuizen wrote:
Indeed, I can confirm Delphi does this. I think since 2009 or XE or
so,
I'm too lazy to check right now, but I think even delphi 5 and such used
paths in the dpr (project) file
Would be interesting to find out the real reason, but once again, I'm
Indeed, I can confirm Delphi does this. I think since 2009 or XE or so,
but AFAIK it doesn't need to. It does it only for the files that are
explicitly added to the project, but those are also in the dproj file.
And it would compile just fine without explicitly referring to the files
in the
On Sat, February 11, 2017 5:56 am, Fred van Stappen wrote:
>
> Unit names are considered to be unique, so strictly, for the compiler
> there is no need to specify the path explicitly in code when the unit path
> is given to the compiler when calling it from the command line.
>
> To do this, use
[fpc-pascal] uses myunit in '../src/myunit.pas' ?
Unit names are considered to be unique, so strictly, for the compiler
there is no need to specify the path explicitly in code when the unit
path is given to the compiler when calling it from the command line.
To do this, use the -Fu parameter when
Unit names are considered to be unique, so strictly, for the compiler
there is no need to specify the path explicitly in code when the unit
path is given to the compiler when calling it from the command line.
To do this, use the -Fu parameter when calling fpc to include ../src to
the unit
45 matches
Mail list logo