SpriteTools icon indicating copy to clipboard operation
SpriteTools copied to clipboard

Errors compiling

Open Magicrafter13 opened this issue 7 years ago • 5 comments

I am trying to install this, here's what happens:

spritetools_collision.c arm-none-eabi-gcc -MMD -MP -MF /c/Users/Matthew/Source/Repos/SpriteTools/build/s pritetools_collision.d -g -Wall -Werror -O2 -mword-relocations -ffunction-sectio ns -fno-strict-aliasing -fomit-frame-pointer -march=armv6k -mtune=mpcore -mfloat -abi=hard -mtp=soft -I/c/Users/Matthew/Source/Repos/SpriteTools/include -I/c/dev kitPro/libctru/include -I/c/Users/Matthew/Source/Repos/SpriteTools/build -DARM11 -D_3DS -c /c/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collisio n.c -o spritetools_collision.o c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c: In fun ction 'ST_HitboxCreatePoint': c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:24:29: error: implicit declaration of function 'calloc' [-Werror=implicit-function-decl aration] st_hitboxpoint *tempbox = calloc(sizeof(st_hitboxpoint), 1); ^~~~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:24:29: error: incompatible implicit declaration of built-in function 'calloc' [-Werror]

c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:24:29: note: include '<stdlib.h>' or provide a declaration of 'calloc' c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c: In fun ction 'ST_HitboxFreePoint': c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:40:3: e rror: implicit declaration of function 'free' [-Werror=implicit-function-declara tion] free(hitbox); ^~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:40:3: e rror: incompatible implicit declaration of built-in function 'free' [-Werror] c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:40:3: n ote: include '<stdlib.h>' or provide a declaration of 'free' c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c: In fun ction 'ST_HitboxCreateCircle': c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:48:30: error: incompatible implicit declaration of built-in function 'calloc' [-Werror]

st_hitboxcircle *tempbox = calloc(sizeof(st_hitboxcircle), 1); ^~~~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:48:30: note: include '<stdlib.h>' or provide a declaration of 'calloc' c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c: In fun ction 'ST_HitboxFreeCircle': c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:65:3: e rror: incompatible implicit declaration of built-in function 'free' [-Werror] free(hitbox); ^~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:65:3: n ote: include '<stdlib.h>' or provide a declaration of 'free' c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c: In fun ction 'ST_HitboxCreateLine': c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:84:28: error: incompatible implicit declaration of built-in function 'calloc' [-Werror]

st_hitboxline *tempbox = calloc(sizeof(st_hitboxline), 1); ^~~~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:84:28: note: include '<stdlib.h>' or provide a declaration of 'calloc' c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:92:18: error: incompatible types when assigning to type 'st_hitboxpoint {aka struct }' from type 'st_hitboxpoint * {aka struct *}' tempbox->start = start; ^ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:93:16: error: incompatible types when assigning to type 'st_hitboxpoint {aka struct }' from type 'st_hitboxpoint * {aka struct *}' tempbox->end = end; ^ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c: In fun ction 'ST_HitboxFreeLine': c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:104:22: error: incompatible type for argument 1 of 'ST_HitboxFreePoint' ST_HitboxFreePoint(hitbox->start); ^~~~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:36:6: n ote: expected 'st_hitboxpoint * {aka struct *}' but argument is of t ype 'st_hitboxpoint {aka struct }' void ST_HitboxFreePoint(st_hitboxpoint *hitbox) ^~~~~~~~~~~~~~~~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:105:22: error: incompatible type for argument 1 of 'ST_HitboxFreePoint' ST_HitboxFreePoint(hitbox->end); ^~~~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:36:6: n ote: expected 'st_hitboxpoint * {aka struct *}' but argument is of t ype 'st_hitboxpoint {aka struct }' void ST_HitboxFreePoint(st_hitboxpoint *hitbox) ^~~~~~~~~~~~~~~~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:106:3: error: incompatible implicit declaration of built-in function 'free' [-Werror] free(hitbox); ^~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:106:3: note: include '<stdlib.h>' or provide a declaration of 'free' c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c: In fun ction 'ST_HitboxCreateRect': c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:114:30: error: incompatible implicit declaration of built-in function 'calloc' [-Werror ] st_hitboxcircle *tempbox = calloc(sizeof(st_hitboxrect), 1); ^~~~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:114:30: note: include '<stdlib.h>' or provide a declaration of 'calloc' c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:120:10: error: 'st_hitboxcircle {aka struct }' has no member named 'width' tempbox->width = w; ^~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:121:10: error: 'st_hitboxcircle {aka struct }' has no member named 'height' tempbox->height = h; ^~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:123:10: error: return from incompatible pointer type [-Werror=incompatible-pointer-type s] return tempbox; ^~~~~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c: In fun ction 'ST_HitboxFreeRect': c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:132:3: error: incompatible implicit declaration of built-in function 'free' [-Werror] free(hitbox); ^~~~ c:/Users/Matthew/Source/Repos/SpriteTools/source/spritetools_collision.c:132:3: note: include '<stdlib.h>' or provide a declaration of 'free' cc1.exe: all warnings being treated as errors make[1]: *** [spritetools_collision.o] Error 1 make: *** [build] Error 2

Magicrafter13 avatar Oct 13 '17 21:10 Magicrafter13

Make sure you put code inside of fences: ``` code ```

code

It seems like <stdlib.h> isn't being included in spritetools_collision.c for some reason (probably because I never finished it). Are you pulling from master or downloading the most recent release? A release shouldn't have any errors like this, but I dropped this project after starting collision, so that'd be why it wouldn't compile. That being said, I'm planning on reviving this project with a way larger scope soon(tm)

Bryce-Dixon avatar Oct 21 '17 09:10 Bryce-Dixon

I'm trying to compile SpriteTools, not my own project using SpriteTools

I'm pretty sure I cloned from the master, should I use the release?

Magicrafter13 avatar Oct 24 '17 05:10 Magicrafter13

Yes, you should use the latest release.

A release shouldn't have any errors like this, but I dropped this project after starting collision, so that'd be why it wouldn't compile.

(Please close your own issues if they're resolved. This makes sure I can't just say "fixed it" even if it's still broken)

Bryce-Dixon avatar Oct 24 '17 19:10 Bryce-Dixon

Why did you drop it?

Magicrafter13 avatar Oct 25 '17 00:10 Magicrafter13

For a bunch of reasons:

  1. School got to be too much to continue working on the project, so I put it on hiatus.
  2. I learned a ton in school about how to architect an engine as well as more programming techniques and better practices. This is why I restarted ST as ST2 - so I could put what I had learned to use.
  3. SF2D's deprecation. This was the project's graphical backbone and without it, I would have to redo the graphics implementation from scratch which wouldn't be a problem other than the fact that it's a TON of spaghetti code I don't understand anymore. Starting over would make this way easier.
  4. The logo uses copyrighted property. I'd rather start over and rebrand than have Nintendo or CapCom show up 6 months from now saying they own all of my work because I used a sprite of Link from Minish Cap. (Please close your own issues if they're resolved. This makes sure I can't just say "fixed it" even if it's still broken)

Bryce-Dixon avatar Oct 29 '17 17:10 Bryce-Dixon