Hi all,
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.
Which I have done like this:
P := AddPackage('my_app');
P.Directory := 'app';
T := P.Targets.AddProgram('hello.pp');
T.Dependencies.Add('my_pkg');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?
Please find the output of my test case (which is also attached) below.
Regards, Darius
C:developrepositorytest>fpmake -v
Start compiling package my_pkg for target x86_64-win64.
Creating output dir "pkgunitsx86_64-win64"
Compiling target testunit
Executing command "fpc -Twin64 -Px86_64 -FUpkgunitsx86_64-win64 -FuC:lazarusfpc2.6.2unitsx86_64-win64rtl pkgtestunit.pas"
Free Pascal Compiler version 2.6.2 [2014/02/28] for x86_64
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling pkgtestunit.pas
14 lines compiled, 0.0 sec
Generating "pkgunitsx86_64-win64fpunits.cfg"
[ 67%] Compiled package my_pkg
Warning: Circular dependency detected when compiling package my_app with package my_app
Start compiling package my_app for target x86_64-win64.
Creating output dir "appunitsx86_64-win64"
Creating output dir "appbinx86_64-win64"
Warning: Target hello of package my_app depends on another package (my_pkg). These kind of dependencies are not processed
Compiling target hello
Executing command "fpc -Twin64 -Px86_64 -FEappbinx86_64-win64 -FUappunitsx86_64-win64 -FuC:lazarusfpc2.6.2unitsx86_64-win64rtl -Fuapp apphello.pp"
Free Pascal Compiler version 2.6.2 [2014/02/28] for x86_64
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling apphello.pp
hello.pp(6,3) Fatal: Can't find unit testunit used by helloFatal: Compilation aborted
Error: C:lazarusfpc2.6.2binx86_64-win64ppcx64.exe returned an error exitcode (normal if you did not specify a source file to be compiled)
The installer encountered the following error:
External command "fpc -Twin64 -Px86_64 -FEappbinx86_64-win64 -FUappunitsx86_64-win64 -FuC:lazarusfpc2.6.2unitsx86_64-win64rtl -Fuapp apphello.pp" failed with exit code 1. Console output:
Free Pascal Compiler version 2.6.2 [2014/02/28] for x86_64
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling apphello.pp
hello.pp(6,3) Fatal: Can't find unit testunit used by helloFatal: Compilation aborted
Error: C:lazarusfpc2.6.2binx86_64-win64ppcx64.exe returned an error exitcode (normal if you did not specify a source file to be compiled)
