<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Hi all,<br />I'm trying to use fpmake for my own project which is built up of a couple of packages. The final application has a dependency on these packages.</p>
<p>Which I have done like this:</p>
<p> </p>
<p>P := AddPackage('my_app');</p>
<p>P.Directory := 'app';</p>
<p>T := P.Targets.AddProgram('hello.pp');</p>
<p>T.Dependencies.Add('my_pkg');</p>
<p> </p>
<p>However, adding the dendencies does not add the units output dir to the target. I think it would be a good idea to do this by default. Do you agree?</p>
<p>Please find the output of my test case (which is also attached) below.</p>
<p>Regards, Darius</p>
<p> </p>
<div>
<p>C:\develop\repository\test>fpmake -v</p>
<p>Start compiling package my_pkg for target x86_64-win64.</p>
<p>Creating output dir "pkg\units\x86_64-win64"</p>
<p>  Compiling target testunit</p>
<p>    Executing command "fpc -Twin64 -Px86_64 -FUpkg\units\x86_64-win64 -FuC:\lazarus\fpc\2.6.2\units\x86_64-win64\rtl pkg\testunit.pas"</p>
<p>Free Pascal Compiler version 2.6.2 [2014/02/28] for x86_64</p>
<p>Copyright (c) 1993-2012 by Florian Klaempfl and others</p>
<p>Target OS: Win64 for x64</p>
<p>Compiling pkg\testunit.pas</p>
<p>14 lines compiled, 0.0 sec</p>
<p>Generating "pkg\units\x86_64-win64\fpunits.cfg"</p>
<p>[ 67%] Compiled package my_pkg</p>
<p>Warning: Circular dependency detected when compiling package my_app with package my_app</p>
<p>Start compiling package my_app for target x86_64-win64.</p>
<p>Creating output dir "app\units\x86_64-win64"</p>
<p>Creating output dir "app\bin\x86_64-win64"</p>
<p>Warning: Target hello of package my_app depends on another package (my_pkg). These kind of dependencies are not processed</p>
<p>  Compiling target hello</p>
<p>    Executing command "fpc -Twin64 -Px86_64 -FEapp\bin\x86_64-win64 -FUapp\units\x86_64-win64 -FuC:\lazarus\fpc\2.6.2\units\x86_64-win64\rtl -Fuapp\ app\hello.pp"</p>
<p>Free Pascal Compiler version 2.6.2 [2014/02/28] for x86_64</p>
<p>Copyright (c) 1993-2012 by Florian Klaempfl and others</p>
<p>Target OS: Win64 for x64</p>
<p>Compiling app\hello.pp</p>
<p>hello.pp(6,3) Fatal: Can't find unit testunit used by hello</p>
<p>Fatal: Compilation aborted</p>
<p>Error: C:\lazarus\fpc\2.6.2\bin\x86_64-win64\ppcx64.exe returned an error exitcode (normal if you did not specify a source file to be compiled)</p>
<p>The installer encountered the following error:</p>
<p>External command "fpc -Twin64 -Px86_64 -FEapp\bin\x86_64-win64 -FUapp\units\x86_64-win64 -FuC:\lazarus\fpc\2.6.2\units\x86_64-win64\rtl -Fuapp\ app\hello.pp" failed with exit code 1. Console output:</p>
<p>Free Pascal Compiler version 2.6.2 [2014/02/28] for x86_64</p>
<p>Copyright (c) 1993-2012 by Florian Klaempfl and others</p>
<p>Target OS: Win64 for x64</p>
<p>Compiling app\hello.pp</p>
<p>hello.pp(6,3) Fatal: Can't find unit testunit used by hello</p>
<p>Fatal: Compilation aborted</p>
<p>Error: C:\lazarus\fpc\2.6.2\bin\x86_64-win64\ppcx64.exe returned an error exitcode (normal if you did not specify a source file to be compiled)</p>
<p> </p>
</div>
</body></html>