Issues with compiling

Hey, I have been trying to compile Aseprite for a while now and each time I get the same issue and I’m not sure what to do. ninja: build stopped: subcommand failed. after I put in ninja aseprite. Here is the full error code.

C:\aseprite\laf\os/skia/skia_surface.h(202): error C2664: ‘sk_sp SkBitmap::makeShader(const SkSamplingOptions &,const SkMatrix *) const’: cannot convert argument 1 from ‘SkTileMode’ to ‘const SkSamplingOptions &’
C:\aseprite\laf\os/skia/skia_surface.h(203): note: Reason: cannot convert from ‘SkTileMode’ to ‘const SkSamplingOptions’
C:\aseprite\laf\os/skia/skia_surface.h(202): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
C:\deps\skia\include\core\SkBitmap.h(1127): note: see declaration of ‘SkBitmap::makeShader’
C:\aseprite\laf\os/skia/skia_surface.h(241): error C2039: ‘drawBitmapRect’: is not a member of ‘SkCanvas’
C:\deps\skia\include\core\SkSurface.h(26): note: see declaration of ‘SkCanvas’
C:\aseprite\laf\os/skia/skia_surface.h(373): error C2039: ‘drawBitmapRect’: is not a member of ‘SkCanvas’
C:\deps\skia\include\core\SkSurface.h(26): note: see declaration of ‘SkCanvas’
C:\aseprite\laf\os/skia/skia_surface.h(378): error C2661: ‘SkCanvas::drawImageRect’: no overloaded function takes 5 arguments
C:\aseprite\laf\os/skia/skia_surface.h(438): error C2039: ‘drawBitmapRect’: is not a member of ‘SkCanvas’
C:\deps\skia\include\core\SkSurface.h(26): note: see declaration of ‘SkCanvas’
C:\aseprite\laf\os/skia/skia_surface.h(449): error C2039: ‘setFilterQuality’: is not a member of ‘SkPaint’
C:\deps\skia\include\core\SkSurface.h(28): note: see declaration of ‘SkPaint’
C:\aseprite\laf\os/skia/skia_surface.h(450): error C2065: ‘kNone_SkFilterQuality’: undeclared identifier
C:\aseprite\laf\os/skia/skia_surface.h(451): error C2065: ‘kHigh_SkFilterQuality’: undeclared identifier
C:\aseprite\laf\os/skia/skia_surface.h(453): error C2039: ‘drawBitmapRect’: is not a member of ‘SkCanvas’
C:\deps\skia\include\core\SkSurface.h(26): note: see declaration of ‘SkCanvas’
C:\aseprite\laf\os/skia/skia_surface.h(472): error C2039: ‘drawBitmapRect’: is not a member of ‘SkCanvas’
C:\deps\skia\include\core\SkSurface.h(26): note: see declaration of ‘SkCanvas’
C:\aseprite\laf\os/skia/skia_surface.h(488): error C2039: ‘drawBitmapRect’: is not a member of ‘SkCanvas’
C:\deps\skia\include\core\SkSurface.h(26): note: see declaration of ‘SkCanvas’
C:\aseprite\laf\os/skia/skia_surface.h(499): error C2039: ‘setFilterQuality’: is not a member of ‘SkPaint’
C:\deps\skia\include\core\SkSurface.h(28): note: see declaration of ‘SkPaint’
C:\aseprite\laf\os/skia/skia_surface.h(500): error C2065: ‘kNone_SkFilterQuality’: undeclared identifier
C:\aseprite\laf\os/skia/skia_surface.h(501): error C2065: ‘kHigh_SkFilterQuality’: undeclared identifier
C:\aseprite\laf\os/skia/skia_surface.h(503): error C2039: ‘drawBitmapRect’: is not a member of ‘SkCanvas’
C:\deps\skia\include\core\SkSurface.h(26): note: see declaration of ‘SkCanvas’
C:\aseprite\laf\os/skia/skia_surface.h(530): error C2039: ‘drawBitmapRect’: is not a member of ‘SkCanvas’
C:\deps\skia\include\core\SkSurface.h(26): note: see declaration of ‘SkCanvas’
C:\aseprite\laf\os/skia/skia_surface.h(570): warning C4244: ‘-=’: conversion from ‘SkScalar’ to ‘int32_t’, possible loss of data
C:\aseprite\laf\os/skia/skia_surface.h(579): warning C4244: ‘+=’: conversion from ‘SkScalar’ to ‘int32_t’, possible loss of data
C:\aseprite\laf\os/skia/skia_surface.h(588): warning C4244: ‘-=’: conversion from ‘SkScalar’ to ‘int32_t’, possible loss of data
C:\aseprite\laf\os/skia/skia_surface.h(597): warning C4244: ‘+=’: conversion from ‘SkScalar’ to ‘int32_t’, possible loss of data
C:\aseprite\laf\os/skia/skia_surface.h(598): warning C4244: ‘+=’: conversion from ‘SkScalar’ to ‘int32_t’, possible loss of data
C:\aseprite\laf\os/skia/skia_surface.h(613): error C2039: ‘drawBitmapLattice’: is not a member of ‘SkCanvas’
C:\deps\skia\include\core\SkSurface.h(26): note: see declaration of ‘SkCanvas’
ninja: build stopped: subcommand failed.

Please let me know what i can do to fix this.

Make sure you are using the correct version of the skia dependency:
you should use the aseprite-m96 branch or use the precompile versions from:

what c++ compiler are you using?
Make sure you do not try to use mingw by mistake Windows compilation details

I tried the m96 branch and it didn’t work. Also im not sure what C++ compiler im using.

it looks like your aseprite/laf subproject is a version that expect to use aseprite-m81 skia
while your skia is aseprite-m96

the difference between the api change between “laf” using aseprite-m81 and “laf” aseprite-m96 is that the “laf” skia_surface.h
have changed
m_canvas->drawBitmapLattice(…
to
m_canvas->drawImageLattice(…
since 2021-11-09

so try checkout the latest aseprite git master or beta branch.
and make sure also the aseprite/laf git subproject gets updated as well.