Then tar is looking only in PATH. You can use _putenv() at the top of your
program to add the directory your program is in (Get ModuleFileName) to
PATH.

On Feb 18, 2017 8:57 PM, "Matthew A. Postiff" <[email protected]> wrote:

> Thanks Oscar. I already have gzip.exe in the same directory as tar. If I
> run gzip by itself from the command line, it works. If I run tar -cf by
> itself, it works. Only when I do tar -czf ... does it fail with the gzip
> cannot exec error.
>
> Matt
>
>
> On 2/18/2017 2:34 PM, Óscar Fuentes wrote:
> > "Matthew A. Postiff" <[email protected]>
> > writes:
> >
> >> I have a Windows gtk program that I build in an msys2 environment, and
> >> the program itself uses some msys2 utilities. I copy the ones I need
> >> into the C:\program files\myprogram\bin with the idea that I don't have
> >> to install all of msys2 to run the program. In my program I spawn the
> >> command tar -czf
> >>
> >> Tar breaks because it cannot find gzip.
> > You need to copy gzip to your binaries directory, along with any dll it
> > requires.
> >
> >
> > ------------------------------------------------------------
> ------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> > _______________________________________________
> > Msys2-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/msys2-users
> >
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> Msys2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/msys2-users
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to