Sign in Join

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

Mailing lists / lazarus / 2010-11

Free Pascal 2.4.2 released!

19 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Marco van de Voort

Hello,

we have placed a new major release of the Free Pascal Compiler, version 2.4.2 on our ftp-servers.

Changes that may break backwards compatibility are documented at: http://wiki.freepascal.org/User_Changes_2.4.2

Downloads are available at:

the main FTP server at

ftp://ftp.freepascal.org/pub/fpc/dist/2.4.2/

and mirrors like

ftp://freepascal.stack.nl/pub/fpc/dist/2.4.2/
ftp://ftp.hu.freepascal.org/pub/fpc/dist/2.4.2/

and sourceforge.

Enjoy!

The Free Pascal Compiler Team

Free Pascal Compiler

Version 2.4.2

****************************************************************************** What's New in 2.4.2
******************************************************************************

Free Pascal 2.4.2 contains many fixes and a few new features. Most bugfixes in the RTL and packages before june 2010 have been merged.

Please also see http://wiki.freepascal.org/User_Changes_2.4.2 for a list of changes which may affect the behaviour of previously working code, and how to cope with these changes.

Some highlights are:

Compiler:
* Support D2006+ FOR..IN, with some FPC specific enhancements. Refer to http://wiki.freepascal.org/for-in_loop for more information
* Support for sealed and abstract classes.

Packages:
* Many improvements to the XML units
* Many improvements to the database units
* Many improvemnets to the chm units

Platforms:
* Long term bug in OS/2 implementation of unit Video finally fixed which among others allows inclusion of the text-mode IDE (without debugger) for this platform as part of the distribution again.

See http://bugs.freepascal.org/changelog_page.php for the list of reported bugs which have been fixed in this release.

Reply by email

Sven Barth
to Marco van de Voort
Marco van de Voort wrote 24 lines
Hello, we have placed a new major release of the Free Pascal Compiler, version 2.4.2 on our ftp-servers. Changes that may break backwards compatibility are documented at: http://wiki.freepascal.org/User_Changes_2.4.2 Downloads are available at: the main FTP server at ftp://ftp.freepascal.org/pub/fpc/dist/2.4.2/ and mirrors like ftp://freepascal.stack.nl/pub/fpc/dist/2.4.2/ ftp://ftp.hu.freepascal.org/pub/fpc/dist/2.4.2/ and sourceforge. Enjoy! The Free Pascal Compiler Team

Congratulations to the whole team!

I believe this was a long awaited release (especially for Lazarus) and let's hope that there aren't any nasty "surprises" (yes, I know that we users should have tested more well *blush* ) this time.

Enjoy your weekend all together, I think you've earned it ;)

Regards,
Sven

Reply by email

Bo Berglund
to Marco van de Voort: we have placed a new major release of the Free Pascal Compiler, version 2.4.2 on our…
Show quoted text 19 lines
Hello, we have placed a new major release of the Free Pascal Compiler, version 2.4.2 on our ftp-servers. Changes that may break backwards compatibility are documented at: http://wiki.freepascal.org/User_Changes_2.4.2 Downloads are available at: the main FTP server at ftp://ftp.freepascal.org/pub/fpc/dist/2.4.2/ and mirrors like ftp://freepascal.stack.nl/pub/fpc/dist/2.4.2/ ftp://ftp.hu.freepascal.org/pub/fpc/dist/2.4.2/

I downloaded the win32 installer from the ftp site and started it. While in the setup dialogs I found that it installs what it calls the FPC IDE and asks if I want to set file associations to point to the IDE.
Question:
Does this mean that it installs a new version of lazarus as well??? If not, what is the FPC IDE? Another development environment???

I was about to install fpc into c:\Programs\lazarus\fpc\2.4.2, but now I am not so sure because of the confusing dialogs. :-(

The c:\Programs\lazarus\fpc\2.2.4 folder was where the Lazarus installer deposited the fpc version 2.2.4, so I figured that I could put 2.4.2 in parallel to that version in folder 2.4.2.

But that was before I saw the IDE questions popping up...

Bo Berglund

Reply by email

Sven Barth
to Bo Berglund
Bo Berglund wrote 8 lines
I downloaded the win32 installer from the ftp site and started it. While in the setup dialogs I found that it installs what it calls the FPC IDE and asks if I want to set file associations to point to the IDE. Question: Does this mean that it installs a new version of lazarus as well??? If not, what is the FPC IDE? Another development environment???

The FPC IDE is the text mode IDE maintained by the FPC team itself (Lazarus is a separate but closely related project). The IDE resembles the Turbo Pascal IDE, but has some modern features as well.

You can install it without any conflicts with Lazarus. It's inside the %FPCINSTALLDIR%\bin\i386-win32\ folder and named "fp.exe".

You should not associate the source files with FP IDE though if you prefer Lazarus.

Show quoted text 7 lines
I was about to install fpc into c:\Programs\lazarus\fpc\2.4.2, but now I am not so sure because of the confusing dialogs. :-( The c:\Programs\lazarus\fpc\2.2.4 folder was where the Lazarus installer deposited the fpc version 2.2.4, so I figured that I could put 2.4.2 in parallel to that version in folder 2.4.2.

You can install into that folder without problems. As said the two IDEs won't conflict with each other (except the file associations, but most applications have a similar problem ^^).

Regards,
Sven

Reply by email

Bo Berglund
to Sven Barth
Sven Barth wrote 32 lines
On 13.11.2010 22:53, Bo Berglund wrote: > I downloaded the win32 installer from the ftp site and started it. > While in the setup dialogs I found that it installs what it calls the > FPC IDE and asks if I want to set file associations to point to the > IDE. > Question: > Does this mean that it installs a new version of lazarus as well??? > If not, what is the FPC IDE? Another development environment??? > The FPC IDE is the text mode IDE maintained by the FPC team itself (Lazarus is a separate but closely related project). The IDE resembles the Turbo Pascal IDE, but has some modern features as well. You can install it without any conflicts with Lazarus. It's inside the %FPCINSTALLDIR%\bin\i386-win32\ folder and named "fp.exe". You should not associate the source files with FP IDE though if you prefer Lazarus. > I was about to install fpc into c:\Programs\lazarus\fpc\2.4.2, but now > I am not so sure because of the confusing dialogs. :-( > > The c:\Programs\lazarus\fpc\2.2.4 folder was where the Lazarus > installer deposited the fpc version 2.2.4, so I figured that I could > put 2.4.2 in parallel to that version in folder 2.4.2. > You can install into that folder without problems. As said the two IDEs won't conflict with each other (except the file associations, but most applications have a similar problem ^^).

Thanks for the clarification!
I will go ahead and install fpc, then change the compiler location in Lazarus and recompile it and go from there. :-)

Bo Berglund

Reply by email

Bo Berglund
to Bo Berglund
Bo Berglund wrote 9 lines
>You can install into that folder without problems. As said the two IDEs >won't conflict with each other (except the file associations, but most >applications have a similar problem ^^). > Thanks for the clarification! I will go ahead and install fpc, then change the compiler location in Lazarus and recompile it and go from there. :-)

OOPS!
Forgot to ask:
If I do this in the directory C:\Programs\lazarus: C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all will this recompile lazarus with the new fpc?
Or do I need to make some changes elsewhere first? How is the new compiler specified for the rebuild?

Bo Berglund

Reply by email

Sven Barth
to Bo Berglund
Bo Berglund wrote 19 lines
On Sat, 13 Nov 2010 23:45:39 +0100, Bo Berglund wrote: >> You can install into that folder without problems. As said the two IDEs >> won't conflict with each other (except the file associations, but most >> applications have a similar problem ^^). >> > > Thanks for the clarification! > I will go ahead and install fpc, then change the compiler location in > Lazarus and recompile it and go from there. :-) > OOPS! Forgot to ask: If I do this in the directory C:\Programs\lazarus: C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all will this recompile lazarus with the new fpc? Or do I need to make some changes elsewhere first? How is the new compiler specified for the rebuild?

When you do this in C:\Programs\lazarus the make utility will look for fpc in %PATH%. Execute "fpc -i" in a console window and at the top of the output you'll see the version number of the compiler. If you want to use a different one you need to specify it to the make utility by setting the "FPC" variable.

E.g.

C:\Programs\lazarus\>
C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all FPC=Some\Other\Dir\With\fpc.exe

If you have used the installer for 2.4.2 the path
"C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32" should already be in %PATH% (and thus you could also just use "make" without the path...).

You can also recompile the IDE from within the IDE if you want to.

Regards,
Sven

Reply by email

Michael Van Canneyt
to Bo Berglund: On Sat, 13 Nov 2010 23:45:39 +0100, Bo Berglund OOPS! Forgot to ask: If I do this in the…
Bo Berglund wrote 18 lines
On Sat, 13 Nov 2010 23:45:39 +0100, Bo Berglund wrote: >> You can install into that folder without problems. As said the two IDEs >> won't conflict with each other (except the file associations, but most >> applications have a similar problem ^^). >> > > Thanks for the clarification! > I will go ahead and install fpc, then change the compiler location in > Lazarus and recompile it and go from there. :-) > OOPS! Forgot to ask: If I do this in the directory C:\Programs\lazarus: C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all will this recompile lazarus with the new fpc? Or do I need to make some changes elsewhere first?

Make sure the PATH environment variable
contains the path to the correct fpc executable;
that should be enough.

How is the new compiler specified for the rebuild?

You can force a particular compiler with the PP variable:

make PP=C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\fpc

Michael.

Reply by email

Sven Barth
to Michael Van Canneyt
Michael Van Canneyt wrote 25 lines
On Sun, 14 Nov 2010, Bo Berglund wrote: > On Sat, 13 Nov 2010 23:45:39 +0100, Bo Berglund > wrote: > >>> You can install into that folder without problems. As said the two IDEs >>> won't conflict with each other (except the file associations, but most >>> applications have a similar problem ^^). >>> >> >> Thanks for the clarification! >> I will go ahead and install fpc, then change the compiler location in >> Lazarus and recompile it and go from there. :-) >> > OOPS! > Forgot to ask: > If I do this in the directory C:\Programs\lazarus: > C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all > will this recompile lazarus with the new fpc? > Or do I need to make some changes elsewhere first? Make sure the PATH environment variable contains the path to the correct fpc executable; that should be enough.

Can it be that make searches for binaries in its own directory? (or does Windows do that by default?!)

E.g. (without any FPC dir in %PATH%):

C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe will use FPC 2.4.2 in the same directory

and

C:\Programs\lazarus\fpc\2.2.4\bin\i386-win32\make.exe will use FPC 2.2.4 in the same directory

This would explain the behavior described in Bo's mail "Multiple FPC versions for Lazarus 0.9.28.2", where he "just" switched the make utility and achieved different results

Regards,
Sven

Reply by email

hector fiandor
to Michael Van Canneyt: Make sure the PATH environment variable contains the path to the correct fpc executable;…

Dear members:

I am learning the use of TDBF with a very low experience in BD.

I have two tables and in the secondary table I have declared a field connected with another field in the master table.
I ask: What component you suggest to read the fields in the master and select one of them?

Another question, Is possible to use a mask for values to have always two decimal places (the cents).?

Thanks in advance,

yours truly,

Ing. H?ctor F. Fiandor Rosario

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/

Reply by email

Bo Berglund
to Sven Barth: When you do this in C:\Programs\lazarus the make utility will look for fpc in %PATH%.…
Sven Barth wrote 32 lines
On 14.11.2010 00:06, Bo Berglund wrote: > On Sat, 13 Nov 2010 23:45:39 +0100, Bo Berglund > wrote: > >>> You can install into that folder without problems. As said the two IDEs >>> won't conflict with each other (except the file associations, but most >>> applications have a similar problem ^^). >>> >> >> Thanks for the clarification! >> I will go ahead and install fpc, then change the compiler location in >> Lazarus and recompile it and go from there. :-) >> > OOPS! > Forgot to ask: > If I do this in the directory C:\Programs\lazarus: > C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all > will this recompile lazarus with the new fpc? > Or do I need to make some changes elsewhere first? > How is the new compiler specified for the rebuild? When you do this in C:\Programs\lazarus the make utility will look for fpc in %PATH%. Execute "fpc -i" in a console window and at the top of the output you'll see the version number of the compiler. If you want to use a different one you need to specify it to the make utility by setting the "FPC" variable. E.g. C:\Programs\lazarus\> C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all FPC=Some\Other\Dir\With\fpc.exe

OK, that is the info I needed to know, but meanwhile I have been told that there also exists a lazarus "configuration" in %APPDATA% and that this contains a specifier on which compiler to use. If this is the case then this location is not lazarus install specific and not fpc install specific either so it makes life much harder to have different versions available at the same time... I guess that Microsoft decided tha we can have only one single version of a program installed on Windows at a single time. :-(

And now my problem is to find out if this configuration setting is used by the command line rebuild of lazarus or only if the rebuild is started from within lazarus...
Anyone knows the answer to this?

If you have used the installer for 2.4.2 the path "C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32" should already be in %PATH% (and thus you could also just use "make" without the path...).

I inspected the path by reading it on the command line, but there was no trace of fpc (not 2.4.2 and not 2.2.4 from the lazarus installation either).
This lack of path info previously forced me to use the full path to make.exe because otherwise the make that would be picked up was the one from my BDS2006 installation, which is on path. I got this advice when I wanted to rebuild a broken lazarus.

Now I looked in ControlPanel/System/Advanced/Environment and I can see the added path, but it was done to the SYSTEM path, not the USER path. The difference between thies is very profound, anything added to USER path will be available to any application that is started after the setting has been done, but in order to get the SYSTEM path changes activated you need to restart Windows....
That is why I don't have fpc 2.4.2 on my path yet.

I think the fpc installer should tell the user that in order to get the path set he must restart Windows.

You can also recompile the IDE from within the IDE if you want to. Regards, Sven
Bo Berglund Developer in Sweden

Reply by email

Sven Barth
to Bo Berglund
Bo Berglund wrote 7 lines
> C:\Programs\lazarus\> > C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all > FPC=Some\Other\Dir\With\fpc.exe OK, that is the info I needed to know, but meanwhile I have been told that there also exists a lazarus "configuration" in %APPDATA% and that this contains a specifier on which compiler to use.

This setting is only used when you compile an application inside Lazarus or you compile the IDE within the IDE. If you use make the mechanisms I described are used.

Show quoted text 6 lines
If this is the case then this location is not lazarus install specific and not fpc install specific either so it makes life much harder to have different versions available at the same time... I guess that Microsoft decided tha we can have only one single version of a program installed on Windows at a single time. :-(

This isn't a decision done by Microsoft, but by the Lazarus team.

Show quoted text 5 lines
And now my problem is to find out if this configuration setting is used by the command line rebuild of lazarus or only if the rebuild is started from within lazarus... Anyone knows the answer to this?

I believe I've already sent you that today ^^

You need to launch Lazarus with an additional command line parameter: --pcp or --primary-config-path. This will tell Lazarus to use the path you specify there as the configuration path instead of "%APPDATA%\lazarus".

E.g.:

lazarus.exe --pcp=C:\configs\lazarus\0.9.28.2\

You can also specify this for the shortcuts on the desktop or in the startmenu. Click on them with the right mouse key and go to "Settings" (or "Properties", I don't know what it's called in an English Windows). Then their is a edit box that's labeled "target" or similar and should contain your path to Lazarus (e.g. C:\Programs\lazarus\lazarus.exe). There you just append the pcp option like above. Then press OK and double click the shortcut. :)

Show quoted text 20 lines
> If you have used the installer for 2.4.2 the path > "C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32" should already be in > %PATH% (and thus you could also just use "make" without the path...). I inspected the path by reading it on the command line, but there was no trace of fpc (not 2.4.2 and not 2.2.4 from the lazarus installation either). This lack of path info previously forced me to use the full path to make.exe because otherwise the make that would be picked up was the one from my BDS2006 installation, which is on path. I got this advice when I wanted to rebuild a broken lazarus. Now I looked in ControlPanel/System/Advanced/Environment and I can see the added path, but it was done to the SYSTEM path, not the USER path. The difference between thies is very profound, anything added to USER path will be available to any application that is started after the setting has been done, but in order to get the SYSTEM path changes activated you need to restart Windows.... That is why I don't have fpc 2.4.2 on my path yet.

Ehm... no. In the last few weeks I've worked on my system PATH very often and I never restarted Windows. You just need to restart the applications that use the PATH, because their environment settings are fixed once they've started (and no, you don't need to restart explorer.exe). So if you have a command window open and you change the PATH in the Control Panel then you need to close that command window and start it again. Just try it :)

As a side note: it seems that either make or Windows look for executables in the directory where make is located. Thus when you use the make in your 2.2.4 dir it uses the 2.2.4 compiler and if you use the make in your 2.4.2 dir it will use the 2.4.2 compiler. This changes of course if you explicitly specify a compiler using the FPC or PP variable when calling make...

Regards,
Sven

Reply by email

Bo Berglund
to Sven Barth
Sven Barth wrote 28 lines
>> If you have used the installer for 2.4.2 the path >> "C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32" should already be in >> %PATH% (and thus you could also just use "make" without the path...). > > I inspected the path by reading it on the command line, but there was > no trace of fpc (not 2.4.2 and not 2.2.4 from the lazarus installation > either). > This lack of path info previously forced me to use the full path to > make.exe because otherwise the make that would be picked up was the > one from my BDS2006 installation, which is on path. > I got this advice when I wanted to rebuild a broken lazarus. > > Now I looked in ControlPanel/System/Advanced/Environment and I can see > the added path, but it was done to the SYSTEM path, not the USER path. > The difference between thies is very profound, anything added to USER > path will be available to any application that is started after the > setting has been done, but in order to get the SYSTEM path changes > activated you need to restart Windows.... > That is why I don't have fpc 2.4.2 on my path yet. > Ehm... no. In the last few weeks I've worked on my system PATH very often and I never restarted Windows. You just need to restart the applications that use the PATH, because their environment settings are fixed once they've started (and no, you don't need to restart explorer.exe). So if you have a command window open and you change the PATH in the Control Panel then you need to close that command window and start it again. Just try it :)

I have inspected the environment variable path as follows (for readability I have replaced ; with CRLF so each path item will be on a separate line):

In ControlPanel the System path is:

C:\Programs\Tcl\bin
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\
C:\Programs\Borland\BDS\4.0\Bin
C:\Programs\Python\.
C:\Programs\Borland\Delphi7\Bin
C:\Programs\Borland\Delphi7\Projects\Bpl\
%SystemRoot%\system32
%SystemRoot%
%SystemRoot%\System32\Wbem
C:\Program Files\Microsoft SQL Server\80\Tools\BINN C:\Program Files\Borland\CaliberRM SDK 2005 R2\lib c:\Program Files\Microsoft SQL Server\90\Tools\binn\ C:\Programs\ULTRAE~1
C:\Programs\Microchip\MPLAB IDE\VDI
C:\Programs\GnuPG
C:\Program Files\IVI Foundation\VISA\WinNT\Bin\
C:\Program Files\IVI Foundation\VISA\WinNT\Bin
C:\Programs\TortoiseSVN\bin
C:\Programs\Subversion\bin
C:\Programs\lazarus\fpc\2.4.2\bin\i386-Win32

And user path is:

C:\Programs\Utils
C:\Documents and Settings\Bosse\My Documents\Borland Studio Projects\Bpl
C:\Programs\CVSNT\
C:\Programs\QT\4.4.3\bin

When I start a new command window and type PATH into it:

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\
C:\Programs\Borland\BDS\4.0\Bin
C:\Programs\Python\.
C:\Programs\Borland\Delphi7\Bin
C:\Programs\Borland\Delphi7\Projects\Bpl\
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\Program Files\Microsoft SQL Server\80\Tools\BINN C:\Program Files\Borland\CaliberRM SDK 2005 R2\lib c:\Program Files\Microsoft SQL Server\90\Tools\binn\ C:\Programs\ULTRAE~1
C:\Programs\Microchip\MPLAB IDE\VDI
C:\Programs\GnuPG
C:\Program Files\IVI Foundation\VISA\WinNT\Bin\
C:\Program Files\IVI Foundation\VISA\WinNT\Bin
C:\Programs\TortoiseSVN\bin
C:\Programs\Subversion\bin
C:\Programs\Utils
C:\Documents and Settings\Bosse\My Documents\Borland Studio Projects\Bpl
C:\Programs\CVSNT\
C:\Programs\QT\4.4.3\bin

As you can see in the active path there is no sign of FPC, but I have not restarted after installing FPC...

------------ Restarting test PC --------

And here is the output of path after restart:

C:\Programs\Tcl\bin
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\
C:\Programs\Borland\BDS\4.0\Bin
C:\Programs\Python\.
C:\Programs\Borland\Delphi7\Bin
C:\Programs\Borland\Delphi7\Projects\Bpl\
C:\WINDOWS\system32
C:\WINDOWS
C:\WINDOWS\System32\Wbem
C:\Program Files\Microsoft SQL Server\80\Tools\BINN C:\Program Files\Borland\CaliberRM SDK 2005 R2\lib c:\Program Files\Microsoft SQL Server\90\Tools\binn\ C:\Programs\ULTRAE~1
C:\Programs\Microchip\MPLAB IDE\VDI
C:\Programs\GnuPG
C:\Program Files\IVI Foundation\VISA\WinNT\Bin\
C:\Program Files\IVI Foundation\VISA\WinNT\Bin
C:\Programs\TortoiseSVN\bin
C:\Programs\Subversion\bin
C:\Programs\lazarus\fpc\2.4.2\bin\i386-Win32
C:\Programs\Utils
C:\Documents and Settings\Bosse\My Documents\Borland Studio Projects\Bpl
C:\Programs\CVSNT\
C:\Programs\QT\4.4.3\bin

Now two items have been added:
C:\Programs\Tcl\bin
C:\Programs\lazarus\fpc\2.4.2\bin\i386-Win32

Show quoted text 6 lines
As a side note: it seems that either make or Windows look for executables in the directory where make is located. Thus when you use the make in your 2.2.4 dir it uses the 2.2.4 compiler and if you use the make in your 2.4.2 dir it will use the 2.4.2 compiler. This changes of course if you explicitly specify a compiler using the FPC or PP variable when calling make...

Yes, I guess that would be the case if make.exe changes the current dir when it starts.

But the strange thing in that case is that the lazaus makefile resides in the directory where I invoked the command so how does make find it if it changes the current dir?

I had a look at the makefile and searched for FPC and located a section where it goes to extensive lengths to find the FPC compiler!

Anyways I repeated my compilation now with the extra FPC argument added (all on one line of course):

C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all FPC=C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\fpc.exe

At the end there was this error:

Compiling lazconfigstorage.pas
lresources.pp(5320,13) Error: Incompatible types: got "AnsiString" expected "Char"
lresources.pp(5514) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

I guess I have to get the dev snapshot of lazarus sources to get around this?

Bo Berglund

Reply by email

Bo Berglund
to hector fiandor: Dear members: I am learning the use of TDBF with a very low experience in BD. I have two…
"hector fiandor" wrote 12 lines
Dear members: I am learning the use of TDBF with a very low experience in BD. I have two tables and in the secondary table I have declared a field connected with another field in the master table. I ask: What component you suggest to read the fields in the master and select one of them? Another question, Is possible to use a mask for values to have always two decimal places (the cents).?

What about starting a separate thread about this rather than hijacking this one?

Bo Berglund

Reply by email

Sven Barth
to Bo Berglund: On Sun, 14 Nov 2010 21:00:20 +0100, Sven Barth I have inspected the environment variable…
Bo Berglund wrote 5 lines
I have inspected the environment variable path as follows (for readability I have replaced ; with CRLF so each path item will be on a separate line):

[snip]

Strange... can you please test the following:

* add a path to the user path and check whether a freshly started command window contains that path
* add a path to the system path and check whether a freshly started command window contains that path
* add one path to the user path and one to the system path and check whether a freshly started command window contains one or both of the paths (this is obviously only needed if one of the two preceding tests is successful ^^)

Show quoted text 16 lines
> As a side note: it seems that either make or Windows look for > executables in the directory where make is located. Thus when you use > the make in your 2.2.4 dir it uses the 2.2.4 compiler and if you use the > make in your 2.4.2 dir it will use the 2.4.2 compiler. This changes of > course if you explicitly specify a compiler using the FPC or PP variable > when calling make... Yes, I guess that would be the case if make.exe changes the current dir when it starts. But the strange thing in that case is that the lazaus makefile resides in the directory where I invoked the command so how does make find it if it changes the current dir?

I'm not talking about the Makefile... I'm talking about the make.exe. If you look into the bin\i386-win32 directories, you'll see that it contains other executables besides make and fpc. Those are found by the make utility as well, so it might be that make compiled for Windows adds its own directory to its own copy of PATH as well (it does not cd into that directory!). And all tools (e.g. mkdir, cp, etc) that a makefile uses by relative paths are found in that directory... and a "relative" fpc is found there as well.

Show quoted text 20 lines
I had a look at the makefile and searched for FPC and located a section where it goes to extensive lengths to find the FPC compiler! Anyways I repeated my compilation now with the extra FPC argument added (all on one line of course): C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all FPC=C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\fpc.exe At the end there was this error: Compiling lazconfigstorage.pas lresources.pp(5320,13) Error: Incompatible types: got "AnsiString" expected "Char" lresources.pp(5514) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted I guess I have to get the dev snapshot of lazarus sources to get around this?

Yes, seems so...

Regards,
Sven

Reply by email

Hans-Peter Diettrich
to Bo Berglund: On Sat, 13 Nov 2010 23:45:39 +0100, Bo Berglund OOPS! Forgot to ask: If I do this in the…
If I do this in the directory C:\Programs\lazarus: C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\make.exe clean all will this recompile lazarus with the new fpc?

Only if there is a Makefile in that directory.

Or do I need to make some changes elsewhere first?

I use to change the PATH in my console window to e.g. PATH=D:\lazarus\fpc\2.4.2\bin\i386-win32
or whatever is applicable to your installation. This way no other (BDS...) tools can get into the way. Effectively I've put according setpath24.bat and setpath25.bat files into the bin directory, that is in the initial Windows PATH.

Then I CD into the desired FPC (or Lazarzus) directory, where the Makefile resides, and do a make clean all.

How is the new compiler specified for the rebuild?

This can be done with the PP=... or FPC=... options (should be equivalent): make clean all PP=C:\Programs\lazarus\fpc\2.4.2\bin\i386-win32\fpc.exe

DoDi

Reply by email

Bo Berglund
to Sven Barth: [snip] Strange... can you please test the following: * add a path to the user path and…
Sven Barth wrote 19 lines
On 14.11.2010 21:52, Bo Berglund wrote: > > I have inspected the environment variable path as follows (for > readability I have replaced ; with CRLF so each path item will be on a > separate line): > [snip] Strange... can you please test the following: * add a path to the user path and check whether a freshly started command window contains that path * add a path to the system path and check whether a freshly started command window contains that path * add one path to the user path and one to the system path and check whether a freshly started command window contains one or both of the paths (this is obviously only needed if one of the two preceding tests is successful ^^)

Now at work where I have a Win7 PC I have made the same tests as I did back home on the XP PC. I added one bogus path member to both User and System path via Control Panel.
Results:

Win XP-Pro SP3:
+ New User path updated immediately in newly started cmd processes
- New System path is updated only after a system restart

Win7Pro X64:
+ New User path immediately available in a new cmd window
+ New System path is also immediately available

So I guess it is a legacy thing on XP....

Note though that applications reading the environment variable from the registry rather than using the API will see the new system path entry as soon as it has been saved in Control Panel.

Bo Berglund Developer in Sweden

Reply by email

Sven Barth
to Bo Berglund
Bo Berglund wrote 16 lines
Now at work where I have a Win7 PC I have made the same tests as I did back home on the XP PC. I added one bogus path member to both User and System path via Control Panel. Results: Win XP-Pro SP3: + New User path updated immediately in newly started cmd processes - New System path is updated only after a system restart Win7Pro X64: + New User path immediately available in a new cmd window + New System path is also immediately available So I guess it is a legacy thing on XP....

Thanks for testing.

I'll test that tomorrow at work as well (I have a XP there and I want to know whether I just imagined all that ^^).

Note though that applications reading the environment variable from the registry rather than using the API will see the new system path entry as soon as it has been saved in Control Panel.

I personally consider something like that "bad practice"...

Regards,
Sven

Reply by email

hector fiandor
to Bo Berglund: On Sun, 14 Nov 2010 12:42:44 -0500, "hector fiandor" What about starting a separate…

Dear colegas:

I have solved the main question.

now I need to save the BD table with the float field with two decimal places. I think I need to declare a mask, but I dont know how to do it.

thanks in advance,

yours truly,

Ing. H?ctor F. Fiandor Rosario
Earlier message 52 lines
----- Original Message ----- From: "Bo Berglund" To: Sent: Sunday, November 14, 2010 3:53 PM Subject: Re: [Lazarus] about TDBF from hfiandor 14 nov 2010 > On Sun, 14 Nov 2010 12:42:44 -0500, "hector fiandor" > wrote: > >>Dear members: >> >>I am learning the use of TDBF with a very low experience in BD. >> >>I have two tables and in the secondary table I have declared a field >>connected with another field in the master table. >>I ask: What component you suggest to read the fields in the master and >>select one of them? >> >>Another question, Is possible to use a mask for values to have always two >>decimal places (the cents).? >> > > What about starting a separate thread about this rather than hijacking > this one? > > > Bo Berglund > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > __________ Informaci?n de ESET Smart Security, versi?n de la base de > firmas de virus 5615 (20101112) __________ > > ESET Smart Security ha comprobado este mensaje. > > http://www.eset.com > > > -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas Infomed: http://www.sld.cu/

Reply by email