Relative Search Path
Posted: Fri May 23, 2025 1:08 am
With v10 we can use relative search path names:
Search path:
Building P.mod:
The output of Phase 1 shows that the all modules are found, ie. that the relative directory names are resolved correctly into absolute paths, relative to P1.mod. M1.mod gets compiled, but is not found for M0.mod.
With
the build works, but that should not be necessary, since we have absolute path names during compilation and linking.
However, if I build with the above search path to get a successful compilation, then delete '../lib1', the linker works successfully, ie. finds all compiled modules with the original search path. It's only part of the compilation that fails.
I have also tried
to no avail.
Some more contorted "explorative" definitions:
Does not work:
This works:
What do I miss? Thanks.
Test set-up:Relative path names ( ..\..\Lib\General for example) can be used in the search paths. The paths are evaluated before compilation / linking starts and are relative to the folder which contains the initial source file.
Code: Select all
C:\Astrobe\Test3
+ P1.mod
+ lib0
+ Main.mod
+ M0.mod
+ lib1
+ M1.mod
Code: Select all
MODULE P1;
IMPORT M0, M1;
END P1.
MODULE Main;
END Main.
MODULE M0;
IMPORT M1;
END M0.
MODULE M1;
END M1.
Code: Select all
lib0
lib1
Code: Select all
Astrobe for RP2350 Builder v10.0.1
Builder Phase 1: Checking P.mod and imported modules...
Checking Module Main
Imports:
Folder: C:\Astrobe\Test3\lib0
Status: Missing Main.arm file
Checking Module M1
Imports:
Folder: C:\Astrobe\Test3\lib1
Status: Missing M1.arm file
Checking Module M0
Imports:
M1
Folder: C:\Astrobe\Test3\lib0
Status: Missing M0.arm file
Checking Module P
Imports:
Main
M0
M1
Folder: C:\Astrobe\Test3
Status: Missing P.arm file
------------------
Builder Phase 2: Compiling missing / outdated modules...
compiling Main
new symbol file; code generated = 8 bytes, data = 0 bytes, entries = 0, lines = 2, msecs = 2
------------------
compiling M1
new symbol file; code generated = 8 bytes, data = 0 bytes, entries = 0, lines = 5, msecs = 2
------------------
compiling M0
Line Col
2 13 Error: import not available
With
Code: Select all
lib0
lib1
../lib1
However, if I build with the above search path to get a successful compilation, then delete '../lib1', the linker works successfully, ie. finds all compiled modules with the original search path. It's only part of the compilation that fails.
I have also tried
Code: Select all
./lib0
./lib1
Some more contorted "explorative" definitions:
Does not work:
Code: Select all
lib0
lib1
../Test3/lib1
Code: Select all
lib0
lib1
../../Test3/lib1