I started making my first program in a couple months and got problems making the default code.

Here is the error:


Code:

flyingfisch@flyingfisch-Office-Computer:~/Desktop/PrizmSDK-0.3/projects/ballistics$ make
/usr/local/cross/bin/sh3eb-elf-gcc -MMD -MP -MF /home/flyingfisch/Desktop/PrizmSDK-0.3/projects/ballistics/build/ballistics.d -Os -Wall -mb -m4a-nofpu -mhitachi -nostdlib   -I/home/flyingfisch/Desktop/PrizmSDK-0.3/projects/ballistics/build -I/home/flyingfisch/Desktop/PrizmSDK-0.3/include -std=c99 -c /home/flyingfisch/Desktop/PrizmSDK-0.3/projects/ballistics/src/ballistics.c -o ballistics.o
/home/flyingfisch/Desktop/PrizmSDK-0.3/projects/ballistics/src/ballistics.c:4:6: warning: return type of 'main' is not 'int' [-Wmain]
/home/flyingfisch/Desktop/PrizmSDK-0.3/projects/ballistics/src/ballistics.c: In function 'main':
/home/flyingfisch/Desktop/PrizmSDK-0.3/projects/ballistics/src/ballistics.c:6:10: warning: variable 'blah' set but not used [-Wunused-but-set-variable]
/usr/local/cross/bin/sh3eb-elf-gcc  ballistics.o -mb -m4a-nofpu -mhitachi -nostdlib -T/home/flyingfisch/Desktop/PrizmSDK-0.3/common/prizm.ld -Wl,-static -Wl,-gc-sections  -L/home/flyingfisch/Desktop/PrizmSDK-0.3/lib -lfxcg -lgcc -o /home/flyingfisch/Desktop/PrizmSDK-0.3/projects/ballistics/ballistics.bin
mkg3a -n basic:ballistics -i uns:../unselected.bmp -i sel:../selected.bmp /home/flyingfisch/Desktop/PrizmSDK-0.3/projects/ballistics/ballistics.bin /home/flyingfisch/Desktop/PrizmSDK-0.3/projects/ballistics/ballistics.g3a
Unsupported PNG bit depth or color type, must be RGB-8
make[1]: *** [/home/flyingfisch/Desktop/PrizmSDK-0.3/projects/ballistics/ballistics.g3a] Segmentation fault
make: *** [build] Error 2


And here is the code:


Code:

#include <display_syscalls.h>
#include <keyboard_syscalls.h>

void main(void) {
    int key;
    char blah[10];
    blah[1]='k';

    while (1) {
        Bdisp_AllClr_VRAM();
        GetKey(&key);
        switch (key) {
        }
    }

    return;
}


Could anyone help me out?

Code:

Unsupported PNG bit depth or color type, must be RGB-8 

I am presuming your icon isn't working? Use a 92x64 24bit bmp. That is probably one of the 2 errors otherwise it is just warnings. Instead of this: (you are using "void main"

Code:

void main(void) {

Main is of int type so use this:

Code:

int main(void) {

That should clear some things up.
And the "set but not used" error should hopefully be fairly explanatory: you declared a variable with an initial value, but then never actually used that variable.
I thought the

Code:

warning: variable 'blah' set but not used

was just a warning so it would still allow to compile? Am I wrong?
zeldaking wrote:
I thought the

Code:

warning: variable 'blah' set but not used

was just a warning so it would still allow to compile? Am I wrong?
Yes, anything that is labeled "warning" won't stop compilation, while "error"s do. However, warnings are often indicative of things that will turn out to be bugs when you test the program, especially if the warnings refer to things like pointer conversion and manipulation. Therefore, make sure you at least look over the warnings, even if you ultimately end up temporarily ignoring them.
bad icons. changed em and they work now Smile
flyingfisch wrote:
bad icons. changed em and they work now Smile
Yup, that'll do it. If you look carefully at the output, you'll see that it successfully compiled and linked, and that it was just in the final binary-building phase that it died.
flyingfisch wrote:
bad icons. changed em and they work now Smile
Just wondering, what version of mkg3a do you have (run mkg3a -v)? I see it crashed after failing to load your bad icons, which shouldn't happen. I think that bug was fixed in revision 3ddb31682058, but you may have a different bug there.

If you're still running 0.1e (or whatever is packaged with the newest SDK), you can just drop the latest build in place of the existing one you have.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement