zetaPRIME / libstarlight

3DS Homebrew Application Framework
Other
31 stars 4 forks source link

Make issue #4

Open mothie opened 4 years ago

mothie commented 4 years ago

Hey, could you tell me how you got your preview to compile? I'm interested in using this, but I get the following errors when I try to build:

RenderCore.cpp arm-none-eabi-g++ -MMD -MP -MF /home/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/build/RenderCore.d -g -Wall -Wno-psabi -Wno-error -O2 -mword-relocations -ffunction-sections -fomit-frame-pointer -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -I/home/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source -I/home/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/include -I/opt/devkitpro/libctru/include -I/opt/devkitpro/portlibs/3ds/include -I/home/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/build -DARM11 -D_3DS -fno-rtti -std=c++17 -c /home/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp -o RenderCore.o C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp: In function 'void {anonymous}::ApplyBlendMode(C3D_TexEnv*, starlight::gfx::BlendMode)': C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:162:17: error: 'C3D_TexEnvOp' was not declared in this scope; did you mean 'C3D_TexEnv'? 162 C3D_TexEnvOp(env, C3D_RGB, 0, 0, 0); // and the rest is the same as blend ^~~~ C3D_TexEnv C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp: In static member function 'static void starlight::gfx::RenderCore::BindTexture(C3D_Tex*, const starlight::Color&, starlight::gfx::BlendMode)': C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:192:62: error: invalid conversion from 'int' to 'GPU_TEVSRC' [-fpermissive] 192 C3D_TexEnvSrc(env, C3D_Both, GPU_TEXTURE0, GPU_CONSTANT, 0); ^
int
In file included from C:/devkitPro/libctru/include/citro3d.h:21, from C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:5: C:/devkitPro/libctru/include/c3d/texenv.h:52:13: note: initializing argument 5 of 'void C3D_TexEnvSrc(C3D_TexEnv*, C3D_TexEnvMode, GPU_TEVSRC, GPU_TEVSRC, GPU_TEVSRC)' 52 GPU_TEVSRC s3 _C3D_DEFAULT(GPU_PRIMARY_COLOR)) ^ C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp: In static member function 'static void starlight::gfx::RenderCore::BindColor(const starlight::Color&, starlight::gfx::BlendMode)': C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:199:48: error: invalid conversion from 'int' to 'GPU_TEVSRC' [-fpermissive] 199 C3D_TexEnvSrc(env, C3D_Both, GPU_CONSTANT, 0, 0); ^
int
In file included from C:/devkitPro/libctru/include/citro3d.h:21, from C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:5: C:/devkitPro/libctru/include/c3d/texenv.h:51:13: note: initializing argument 4 of 'void C3D_TexEnvSrc(C3D_TexEnv*, C3D_TexEnvMode, GPU_TEVSRC, GPU_TEVSRC, GPU_TEVSRC)' 51 GPU_TEVSRC s2 _C3D_DEFAULT(GPU_PRIMARY_COLOR), ^ C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:199:51: error: invalid conversion from 'int' to 'GPU_TEVSRC' [-fpermissive] 199 C3D_TexEnvSrc(env, C3D_Both, GPU_CONSTANT, 0, 0); ^
int

In file included from C:/devkitPro/libctru/include/citro3d.h:21, from C:/Users/Jay/Desktop/gitRepos/libstarlight-master/libstarlight/source/starlight/gfx/RenderCore.cpp:5: C:/devkitPro/libctru/include/c3d/texenv.h:52:13: note: initializing argument 5 of 'void C3D_TexEnvSrc(C3D_TexEnv*, C3D_TexEnvMode, GPU_TEVSRC, GPU_TEVSRC, GPU_TEVSRC)' 52 | GPU_TEVSRC s3 _C3D_DEFAULT(GPU_PRIMARY_COLOR)) | ^ make[1]: [/opt/devkitpro/devkitARM/base_rules:80: RenderCore.o] Error 1 make: [Makefile:129: build] Error 2 Make or send failed

zetaPRIME commented 4 years ago

yeah, dependency changes have happened in the multiple years since I've touched this; I (or someone else) need to take another look at things at some point

mothie commented 4 years ago

I got it to compile and install just fine with the latest Citro3D with a few adjustments. I'm new to C++ so I'm not sure if the edits I made are all what they should be, I'll leave them in my fork's rendercore.cpp if you'd like to take a look at them at any point. Thanks for your time.