<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 06/09/12 15:26, Mattias Gaertner
wrote:<br>
</div>
<blockquote
cite="mid:543738376.1396.1346934373535.JavaMail.open-xchange@comcenter.netcologne.de"
type="cite">
<pre wrap="">
patspiper <a class="moz-txt-link-rfc2396E" href="mailto:patspiper@gmail.com"><patspiper@gmail.com></a> hat am 6. September 2012 um 13:58 geschrieben:
</pre>
<blockquote type="cite">
<pre wrap=""><a class="moz-txt-link-freetext" href="http://bugs.freepascal.org/view.php?id=22814">http://bugs.freepascal.org/view.php?id=22814</a>
To launch the IDE, I use a script that lets me select the FPC version
and then:
-----------------------------
export PATH=/home/me/Programs/fpc/$FPC_VER/lib/fpc/$FPC_VER:$PATH
</pre>
</blockquote>
<pre wrap="">
Why the above path?</pre>
</blockquote>
Because the actual compiler and cross-compilers are there. Otherwise
fpc (which is in <i class="moz-txt-slash"><span class="moz-txt-tag">/</span>home/me/Programs/fpc<span
class="moz-txt-tag">/</span></i>$FPC_VER/bin) would not be able
to locate ppc386 and ppcross386. And consequently, one cannot switch
FPC versions without restarting the IDE.<br>
<blockquote
cite="mid:543738376.1396.1346934373535.JavaMail.open-xchange@comcenter.netcologne.de"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">export PATH=/home/me/Programs/fpc/$FPC_VER/bin:$PATH
export PATH=/home/me/Programs/fpc/crossbinutils/bin:$PATH
cd /tmp
/home/supra/Programs/lazarus/lazarus-svn/startlazarus
--pcp="/home/me/Programs/lazarus/config-lazarus-svn" ${CMD_LINE_PARAMS}
-----------------------------
$FPC_VER is 2.6.1 or 2.7.1 for example.
CMD_LINE_PARAMS is for debug purposes
("--debug-enable=DBG_CMD_ECHO,DBG_STATE,DBG_DATA_MONITORS,DBGMI_QUEUE_DEBUG,DBGMI_TYPE_INFO
--debug-log=/tmp/laz.log")
An FPCVER dropdown list in the IDE options could be a solution (Changing
it must trigger the rescan FPC source directory in case it is affected
by the version change). However, will fpc be able to locate ppc386 (the
actual compiler)?
</pre>
</blockquote>
<pre wrap="">
Changing the the compiler in the IDE triggers a rescan of the compiler, which
updates the FPCVer macro. If the path to the FPC sources contains the macro
FPCVer the IDE switches to it. If this directory was not yet scanned it will be
scanned now. The IDE has a cache for multiple compilers and multiple FPC source
directories.</pre>
</blockquote>
Great! But the only shortcoming is that:<br>
- if the actual compiler is not in the path, fpc cannot call it no
matter what.<br>
- if the actual compiler is in the path, then an odd situation will
arise where the IDE will report a mix of FPC versions in about FPC
(IDE internals), the old actual compiler will still be used, and the
new sources are used.<br>
<blockquote
cite="mid:543738376.1396.1346934373535.JavaMail.open-xchange@comcenter.netcologne.de"
type="cite">
<pre wrap="">
You can switch the compiler by using the combobox in the project's options or by
using build modes.</pre>
</blockquote>
The target in project options just cause fpc to call the required
actual compiler. The pitfall is the same as above.<br>
<blockquote
cite="mid:543738376.1396.1346934373535.JavaMail.open-xchange@comcenter.netcologne.de"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">Are there fpc executables other than fpc and the actual compiler needed
by the IDE?
</pre>
</blockquote>
<pre wrap="">
Yes. What exactly depends on your program. For example fpcres is commonly used.
These tools are called by the compiler, not the IDE.</pre>
</blockquote>
This is why the 1st path is required (they are located in the same
folder as the fpc binary).<br>
<br>
Stephano<br>
</body>
</html>