Problem with windows Batch file on windows 7 -


I have a batch file for compiling and linking all of my code, including the following:

  @echo off nasm -f aout -o start.o start.asm gcc -Wall -O -fstrength-redu -fomit-frame-pointer -finline-functions - Nostdinc -fno-builtin-i./ Include -co main.o main.c gcc -Wall -O -fstrength-redu -fomit-frame-pointer -finline-functions -nostdinc -fno -builtin -I./ Include -c -o scrn.o scrn.c Ld -t link.ld -o kernel.bin start.o main.o scrn.o paus  

The problem is, when I print it all just as text Is it definitely a b The file is in. This is going to end the .bat file, and in Notepad ++, the syntax and pause for @OKO OFF are being highlighted without being set manually. Is this a Windows 7 bug? Or am I doing something wrong?

You can be

by double-clicking on the command line or in Explorer Is that the Edit action set as the default?

Right-click and select Open .

EDIT: Maybe your line terminator is messed up Windows CRLF is expected.

In Notepad ++:

  • Click on View-> End of Line.
  • If they are not CRL, then change to Format-> Windows format.

Comments