NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: MediocreVeg1 on January 07, 2021, 06:09:45 AM
-
I've seen some other questions regarding this, but none of them seem to help.
My NASM directory is:
NASM/
test.asm
include/macros/
loops.inc
consoleIO.inc
my consoleIO.inc file includes my loops.inc file and my test.asm file includes both, but when i try to assemble test.asm it says: include/macros/consoleIO.inc:3: fatal: unable to open include file `loops.inc'
Not sure if this information is needed, but I'm running my NASM on a Xubuntu VM and its version is 2.14.02. Thanks in advance :)
-
Please post the relevant line of your .asm file so we cab see how you are declaring it. Nasm needs the relative path to the include file.
-
%include "include/macros/consoleIO.inc"
%include "include/macros/loops.inc" ; Lines 1 and 2
-
UPDATE: So I tried including loops.inc with the absolute path, and it actually worked. But this just seems unnecessary and could cause issues in the future where i would have to change the absolute path every single time. Isn't there a proper way to include relative path?
-
I would have expected that to work, but I keep include files in the same directory as my asm files, so am unsure. Do you know whether it worked right in older versions of nasm?
-
Sorry for the late reply :P
For the version thing, no. I downloaded NASM on this version and I'm not even sure how to change the version. The strangest thing is that including the libraries in the .asm file works just fine, but if I'm including one header file into another header (with relative path), it gives the fatal error.
[EDIT Unrelated, but another issue is that when i do %endrep NASM thinks I'm trying to do modulus on a label. Maybe I half-downloaded it or something like that, 'cause its really scuffed right now