NASM include files

Programming, for all ages and all languages.
Post Reply
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

NASM include files

Post 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.
Only Human
AR

Re:NASM include files

Post 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/
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:NASM include files

Post by Neo »

Thanks a lot AR. Didn't have the time to look that up.
Only Human
Post Reply