Page 1 of 1

NASM include files

Posted: Sun Jun 26, 2005 2:22 am
by Neo
I've been trying to use NASM under CYGWIN and I find that I cannot have the .inc files (includes) in some other directory and use the -i option with it..
When I have the .inc files in the same src directory they work fine. Is there something else I should do?
The command i use is

Code: Select all

nasm -i/cygdrive/c/projects/test/includes -f elf -w+orphan-labels /cygdrive/c/projects/test/src/test1.asm -o /cygdrive/c/projects/test/out/test1.o
and the output with that is

Code: Select all

/cygdrive/e/projects/MyOS/src/test1.asm:10: fatal: unable to open include file `test.inc'
I've used

Code: Select all

%include "test.inc"
in my test1.asm file.

Re:NASM include files

Posted: Sun Jun 26, 2005 2:34 am
by AR
I've checked the manual (using Google: http://webster.cs.ucr.edu/AsmTools/NASM ... SMDOC2.HTM), and it says basically 'NASM does not understand the path convention, the -I parameters are prepended as is' so what you are actually doing is looking for:
/cygdrive/c/projects/test/includestest.inc

Try: -I/cygdrive/c/projects/test/includes/

Re:NASM include files

Posted: Sun Jun 26, 2005 10:46 pm
by Neo
Thanks a lot AR. Didn't have the time to look that up.