Re: output to a directory which doesn't exit yet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



xuantl <xuantl@xxxxxxxxx> writes:

> "gcc -c -o ./objs/foo.o foo.c"
> The above command will put foo.o to the directory ./objs. But if
> ./objs doesn't exist, gcc will prompt error. How to make gcc to create
> the output directory automatically ?

There is no way to make gcc create the directory.

Sorry.

Of course it will work to do

mkdir -p ./objs; gcc -c -o ./objs/foo.o foo.c

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux