Lymphatus / caesium-clt

Caesium Command Line Tools - Lossy/lossless image compression tool
http://saerasoft.com/caesium
Other
354 stars 34 forks source link

Build fails under mingw #40

Closed 4ifi closed 4 years ago

4ifi commented 4 years ago

c:\Users\Admin\Documents\caesium\caesium-clt\build>cmake .. -G "MinGW Makefiles" -- The C compiler identification is GNU 8.1.0 -- The CXX compiler identification is GNU 8.1.0 -- Check for working C compiler: C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe -- Check for working C compiler: C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/g++.exe -- Check for working CXX compiler: C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/g++.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: C:/Users/Admin/Documents/caesium/caesium-clt/build

c:\Users\Admin\Documents\caesium\caesium-clt\build>mingw32-make Scanning dependencies of target caesiumclt [ 14%] Building C object src/CMakeFiles/caesiumclt.dir/vendor/optparse.c.obj [ 28%] Building C object src/CMakeFiles/caesiumclt.dir/error.c.obj [ 42%] Building C object src/CMakeFiles/caesiumclt.dir/helper.c.obj C:\Users\Admin\Documents\caesium\caesium-clt\src\helper.c: In function parse_arguments': C:\Users\Admin\Documents\caesium\caesium-clt\src\helper.c:72:55: error: 'MAX_PATH' undeclared (first use in this function); did you mean 'MAX_PATH_SIZE'? _fullpath(parameters.output_folder, opts.optarg, MAX_PATH); ^~~~ MAX_PATH_SIZE C:\Users\Admin\Documents\caesium\caesium-clt\src\helper.c:72:55: note: each undeclared identifier is reported only once for each function it appears in C:\Users\Admin\Documents\caesium\caesium-clt\src\helper.c: At top level:cc1.exe: warning: unrecognized command line option '-Wno-nullability-completeness' mingw32-make[2]: [src\CMakeFiles\caesiumclt.dir\build.make:91: src/CMakeFiles/caesiumclt.dir/helper.c.obj] Error 1 mingw32-make[1]: [CMakeFiles\Makefile2:93: src/CMakeFiles/caesiumclt.dir/all] Error 2 mingw32-make: *** [Makefile:129: all] Error 2

c:\Users\Admin\Documents\caesium\caesium-clt\build>

Lymphatus commented 4 years ago

I was not able to get the build going on MinGW but it runs ok using MSYS. Can you try building from the MSYS console using cmake .. -G "MSYS Makefiles"?

I tested with MSYS, not MSYS2, but should not change much.