Trying to compile zbspac.exe with MinGW Distro

Viewed 38

I am using this Git for Zbspac.exe

https://github.com/uyjulian/zbspac

And the following for my MinGW Distro:

https://nuwen.net/mingw.html

I have a MinGW distro set up to target my zbspac.exe Makefile. However, I keep getting bounced for

make (e=2): The system cannot find the file specified.
make: *** [Makefile:25: BitStream.o] Error 2

I have BitStream.c and Bitstream.h in the main directory, but it seems the object file doesn't register for the Distro. I feel that it's going to be the same for all the other object files.

My first idea was to create a duplicate file for each .c file into a .o file. This helped clear the issues relating to the .o not being found (although, this solution is probably not ideal). Is there a way to fix this (besides creating duplicate files)?

It then gives me the error

i686-w64-mingw32-gcc -o zbspac.exe  BitStream.o  ByteArray.o  CmdArgs.o  FileSystem.o  HuffmanDecoder.o  HuffmanEncoder.o  Logger.o  LzssDecoder.o  LzssEncoder.o  MinHeap.o  NexasPacker.o  NexasUnpacker.o  ScriptPacker.o  ScriptUnpacker.o  StringUtils.o  zbspac.o  external/zlib/adler32.o  external/zlib/compress.o  external/zlib/crc32.o  external/zlib/deflate.o  external/zlib/gzclose.o  external/zlib/gzlib.o  external/zlib/gzread.o  external/zlib/gzwrite.o  external/zlib/infback.o  external/zlib/inffast.o  external/zlib/inflate.o  external/zlib/inftrees.o  external/zlib/trees.o  external/zlib/uncompr.o  external/zlib/zutil.o  -static -static-libstdc++ -static-libgcc
process_begin: CreateProcess(NULL, i686-w64-mingw32-gcc -o zbspac.exe BitStream.o ByteArray.o CmdArgs.o FileSystem.o HuffmanDecoder.o HuffmanEncoder.o Logger.o LzssDecoder.o LzssEncoder.o MinHeap.o NexasPacker.o NexasUnpacker.o ScriptPacker.o ScriptUnpacker.o StringUtils.o zbspac.o external/zlib/adler32.o external/zlib/compress.o external/zlib/crc32.o external/zlib/deflate.o external/zlib/gzclose.o external/zlib/gzlib.o external/zlib/gzread.o external/zlib/gzwrite.o external/zlib/infback.o external/zlib/inffast.o external/zlib/inflate.o external/zlib/inftrees.o external/zlib/trees.o external/zlib/uncompr.o external/zlib/zutil.o -static -static-libstdc++ -static-libgcc, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [Makefile:22: zbspac.exe] Error 2

, which is a self-referential error, since I want to be compiling zbspac.exe, not referring to it.

For reference, the Makefile, which has not been edited:

EXE_TARGET = zbspac.exe

TXTS = License.txt Readme.txt Instructions.txt PackageFormat.txt ScriptTxtFormat.txt
PROJECT_FILE = Makefile .project .cproject
SRC_DIST = zbspac-src.7z
BIN_DIST = zbspac-bin.7z

CC = i686-w64-mingw32-gcc
LD = i686-w64-mingw32-ld
CFLAGS = -O2 -std=c99 -Werror -Wall -pedantic -pedantic-errors -Iexternal/zlib
LIBS = -static -static-libstdc++ -static-libgcc
DIST_MAKE = 7za a

ZLIB_SRCS = external/zlib/adler32.c external/zlib/compress.c external/zlib/crc32.c external/zlib/deflate.c external/zlib/gzclose.c external/zlib/gzlib.c external/zlib/gzread.c external/zlib/gzwrite.c external/zlib/infback.c external/zlib/inffast.c external/zlib/inflate.c external/zlib/inftrees.c external/zlib/trees.c external/zlib/uncompr.c external/zlib/zutil.c
SRCS = $(wildcard *.c) $(ZLIB_SRCS)
HEADERS = $(wildcard *.h)
OBJS = $(patsubst %.c, %.o, $(SRCS)) 

all: $(EXE_TARGET)

$(EXE_TARGET): $(OBJS)
    $(CC) -o $(EXE_TARGET) $(OBJS) $(LIBS)

%.o: %.c
    $(CC) $(CFLAGS) -c -o $@ $<
    
src_dist: $(SRC_DIST)

bin_dist: $(BIN_DIST)

$(SRC_DIST): $(SRCS) $(HEADERS) $(TXTS) $(PROJECT_FILE)
    $(DIST_MAKE) $(SRC_DIST) $(SRCS) $(HEADERS) $(TXTS) $(PROJECT_FILE)

$(BIN_DIST): $(EXE_TARGET) $(TXTS)
    $(DIST_MAKE) $(BIN_DIST) $(EXE_TARGET) $(TXTS)

.PHONY: clean
    
clean:
    $(RM) $(OBJS) $(EXE_TARGET) $(SRC_DIST) $(BIN_DIST)

How do I solve this?

0 Answers
Related