[build2] Rerunning build2 and getting different results (errors)

Wilhelm Meier wilhelm.meier at hs-kl.de
Tue May 16 16:49:30 UTC 2023



On 16.05.23 15:23, Boris Kolpackov wrote:
> Wilhelm Meier via users <users at build2.org> writes:
> 
>> https://github.com/wimalopaan/build2_test
>>
>> [...]
>>
>> Please give me some hints.
> 
> I gave the hint and the reference to the relevant documentation in my
> previous reply: you need to include buildfiles that declare targets
> that you reference. Specifically, your src/test/buildfile should be:
> 
> ```
> include ../libs/A/
> include ../libs/B/
> 
> exe{test}: cxx{test} ../libs/A/lib{A} ../libs/B/lib{B}
> ```
> 
> If you want to be fancy, you can add an export stub for lib{A} and lib{B}
> in which case you will be able to write:
> 
> ```
> import libs = lib{A} lib{B}
> 
> exe{test}: cxx{test} $libs
> ```

If I try the above import version, build2 looks for a export.build near 
to root.build. But in my understanding I have to (and I did) provide an 
export.build for each libA and libB.

The error is now:

---
test/buildfile:6:15: error: unable to read buildfile 
../build/export.build: no such file or directory
info: while applying rule build.alias to clean dir{./}
info: failed to clean dir{./}
---

This version is also in the github:

https://github.com/wimalopaan/build2_test

Maybe I'm doing things totally weird. But I did my best after reading 
the manual.

What I'm trying is to build a project, that has some internal libraries 
(that may be dependant too) and some applications other directories, 
that rely on these libs. And the libs are module-interface-units only.

Thanks for any help, because I'm really stuck now.
  Wilhelm



More information about the users mailing list