WLALinker in other folders #487
-
Quick addendum:For those that need a quickly concocted solution while waiting for new binaries to release, it turns out that it doesn't do a relative path based on the wlalinker itself, it does a relative path based on the directory the cmd.exe that called upon it is currently looking. A very easy fix would to just be cd into the directory with the listfile and objects, and then call wlalinker from there. Hi all! I posted to SMSPower about this question earlier, but the only one so far to offer help, maxim, doesn't know how to fix it either. Long story short, I have a batch file automating my project compilation. It looks a bit like this. del "finloc"\object.o
del "finloc"\listfile
"compilerlocation\wla-z80.exe" -o "projectlocation"\project.asm "finloc"\object.o
echo [objects]>"finloc"\listfile
echo object.o>>"finloc"\listfile
"compilerlocation\wlalinker.exe" -d -r -v -s "finloc"\listfile "finloc"\output.sms Compilerlocation, finloc, and projectlocation are all relative paths, and thus have quotation marks around for me to avoid worrying about a space somewhere. Now, this code seems like it SHOULD work, but when I run it, the linker returns an error, complaining to me that it could not open It was suggested that wlalinker worked with relativity, which would potentially make sense. So the question is, how do I get WLALinker to operate in other folders that it's not in? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 10 replies
-
Is there any reason why you don't specify the paths like
Personally I've never seen anybody try to use something like "finloc"\object.o |
Beta Was this translation helpful? Give feedback.
-
For reference, I tried both in Cygwin under Windows 10 and they seemed to work I think what happens here is that the command line app processes those quotation marks and just feeds WLA a string without quotation marks. So it's command line dependent how those quotation marks are processed and how they work. WLALINK's linkfile on the other hand is another case as its has its own parser. That might not support (and if I remember right it doesn't) things like "path"/main.asm. I'll come back to this later today... |
Beta Was this translation helpful? Give feedback.
-
I think the explanation is confusing. If I have a working linkfile I can do this:
If I navigate to another folder (e.g. the parent) and pass relative paths, it does not work:
The issue is that paths in the linkfile are not interpreted as relative to its location in the file system, instead they are interpreted as relative to the current directory. |
Beta Was this translation helpful? Give feedback.
-
If you guys now try the latest sources and give WLALINK flag -R, does it work for you? |
Beta Was this translation helpful? Give feedback.
-
Nice to have :) |
Beta Was this translation helpful? Give feedback.
If you guys now try the latest sources and give WLALINK flag -R, does it work for you?