sf2dlib icon indicating copy to clipboard operation
sf2dlib copied to clipboard

Can't compile sf2dlib

Open gnmmarechal opened this issue 8 years ago • 8 comments

root@30821:~/3ds/sf2dlib/libsf2d# make install
sf2d_texture.c
arm-none-eabi-gcc -MMD -MP -MF /root/3ds/sf2dlib/libsf2d/build/sf2d_texture.d -g -Wall -Werror -O2 -mword-relocations -ffunction-sections -fno-strict-aliasing -fomit-frame-pointer -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -I/root/3ds/sf2dlib/libsf2d/include -I/opt/devkitpro/libctru/include -I/root/3ds/sf2dlib/libsf2d/build -DARM11 -D_3DS -c /root/3ds/sf2dlib/libsf2d/source/sf2d_texture.c -o sf2d_texture.o
/root/3ds/sf2dlib/libsf2d/source/sf2d_texture.c: In function 'sf2d_create_rendertarget':
/root/3ds/sf2dlib/libsf2d/source/sf2d_texture.c:60:2: error: too many arguments to function 'Mtx_OrthoTilt'
  Mtx_OrthoTilt(&rt->projection, 0.0f, width, height, 0.0f, 0.0f, 1.0f, true);
  ^
In file included from /opt/devkitpro/libctru/include/citro3d.h:12:0,
                 from /root/3ds/sf2dlib/libsf2d/include/sf2d.h:9,
                 from /root/3ds/sf2dlib/libsf2d/source/sf2d_texture.c:4:
/opt/devkitpro/libctru/include/c3d/maths.h:72:6: note: declared here
 void Mtx_OrthoTilt(C3D_Mtx* mtx, float left, float right, float bottom, float top, float near, fl
      ^
/root/3ds/sf2dlib/libsf2d/source/sf2d_texture.c: In function 'sf2d_texture_tile32_hardware':
/root/3ds/sf2dlib/libsf2d/source/sf2d_texture.c:95:2: error: implicit declaration of function 'C3D_SafeDisplayTransfer' [-Werror=implicit-function-declaration]
  C3D_SafeDisplayTransfer(
  ^
cc1: all warnings being treated as errors
/opt/devkitpro/devkitARM/base_rules:84: recipe for target 'sf2d_texture.o' failed
make[1]: *** [sf2d_texture.o] Error 1
Makefile:98: recipe for target 'build' failed
make: *** [build] Error 2
root@30821:~/3ds/sf2dlib/libsf2d#




gnmmarechal avatar Dec 29 '16 16:12 gnmmarechal

Same issue here capture

UselessMnemonic avatar Dec 29 '16 20:12 UselessMnemonic

Was it ctrulib what broke this?

gnmmarechal avatar Dec 29 '16 21:12 gnmmarechal

Seems to be, author specifically pushed the extra boolean parameter ( #43 & #44 ) but these don't exist in the latest builds

UselessMnemonic avatar Dec 29 '16 21:12 UselessMnemonic

Build the latest ctrulib, then citra3ds, then sf2dlib 👍

UselessMnemonic avatar Dec 30 '16 00:12 UselessMnemonic

Still doesn't build for me, but these are the errors I get: screenshot from 2017-01-08 12-23-40

CaptainSwag101 avatar Jan 08 '17 20:01 CaptainSwag101

I actually know how to fix the first error: just delete the last 'true' argument from line 60 of sf2d_texture.c. However, I can't fix that 2nd error, no matter what I do.

CaptainSwag101 avatar Jan 08 '17 20:01 CaptainSwag101

You haven't built the latest citro3ds build https://github.com/smealum/ctrulib first then https://github.com/fincs/citro3d

(Unless someone broke something again, in which case I'd be happy to send you the compiled libs)

UselessMnemonic avatar Jan 08 '17 21:01 UselessMnemonic

Update Devkit arm, then update to the latest version of Ctrulib. After that, compile Citro3D, then you should be able to compile Sf2d/sflil/sftd.

joel16 avatar Feb 04 '17 07:02 joel16