Doori Bar
Doori Bar

Reputation: 903

Trying to compile LzmaUtil.c from LZMA SDK

I wish to use LZMA natively in my own C util. I've downloaded LZMA SDK from http://www.7-zip.org/sdk.html (version 9.12 beta) - but I simply fail to compile their LzmaUtil.

This is what I've tried, using MinGW:

gcc -c -O2 -Wall -D_7ZIP_ST LzmaUtil.c ../../Alloc.c ../../LzFind.c ../../LzmaDec.c ../../LzmaEnc.c ../../7zFile.c ../../7zStream.c -o lzma.exe
LzmaUtil.c: In function `Decode2':
LzmaUtil.c:95: warning: suggest parentheses around && within ||

When I try to use lzma: "lzma.exe e inputfile outputfile" - Nothing happens. (simply returns without printing or creating the outputfile)

Anybody can help, what I'm doing wrong?

Upvotes: 1

Views: 864

Answers (1)

Starkey
Starkey

Reputation: 9781

The -c option creates an object file, not an executable. Remove the -c and see how it works.

Upvotes: 3

Related Questions