command not found when running from batch

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

command not found when running from batch

zgintasz
Hi,

I'm trying to make building process easier. When I launch cygwin and run build.sh script, everything is fine, but I want to launch this script from batch file. I do this:

@echo off
F:/cygwin/bin/bash --login -c "cd F:/Projektai/osdev && sh build.sh"

When I launch it, I get errors i586-elf-gcc: command not found and i586-elf-ld: command not found. I can't find the solution, how can I fix it?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: command not found when running from batch

marco atzeri-4
On 12/31/2012 4:48 PM, zgintasz wrote:
> Hi,

first: you are on the wrong mailing list,
       use cygwin (at) cygwin (dot) com

>
> I'm trying to make building process easier. When I launch cygwin and run
> build.sh script, everything is fine, but I want to launch this script from
> batch file. I do this:
>
> @echo off
> F:/cygwin/bin/bash --login -c "cd F:/Projektai/osdev && sh build.sh"
>
> When I launch it, I get errors *i586-elf-gcc: command not found* and
> *i586-elf-ld: command not found*. I can't find the solution, how can I fix
> it?

To build what ?

i586-elf-gcc looks a cross compiler, so probably your path is wrong,
as it is not a standard cygwin compiler


>
> Thanks.
>
Marco

Reply | Threaded
Open this post in threaded view
|

Re: command not found when running from batch

zgintasz
This post was updated on .
First of all, thanks for reply. I'm compiling my own project with cygwin by launching build.sh. If I open cygwin, then locate path and then run build.sh, everything works totally fine:
1. open cygwin
2. cd F:/Projektai/osdev
3. ./build.sh
But I'm a bit lazy, so I want to make build process easier - by just launching batch file.
How to make this path correct?
These files are in F:\cygwin\usr\local\cross\bin.

EDIT: I've put F:\cygwin\usr\local\cross\bin in environment variables and it fixed my problem!