Rockbox Development > Starting Development and Compiling

compiling Rockbox for iPod

(1/1)

restart:
i have already followed instruction in this page in making helloworld.c...
i've tried to compile but i have an error...
this is the helloworld.c :
 1    #include "plugin.h"
 2
 3    PLUGIN_HEADER
 4
 5    static const struct plugin_api *rb;
 6
 7    rb->function();
 8    enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter)
 9  {
10   (void)parameter;
11   rb = api;
12   rb->splash(HZ*2, "Hello world!");
13
14   return PLUGIN_OK;
15 }

the error are:
helloworld.c:7: error: syntax error before '->' token
make[2]: *** [/rockbox/build_helloworld/apps/plugins/helloworld.o] Error 1
rm /rockbox/build_helloworld/apps/plugins/credits.elf
make[1]: *** [rocks] Error 2

can anyone help me for this problem??

cool_walking_:
Take out line 7.

On that wiki page, before "rb->function();" it says
--- Quote ---What this means is that to make a call to a function built into the rockbox plugin API, you'd do it like this:
--- End quote ---

"rb->function();" is just an example of syntax.  You're not supposed to put that part in.  I very much doubt there would be a function called "function".

In the future when posting code, use [ code ]code goes here[ /code ] tags (obviously remove the spaces around the words there). Also don't number the lines like that, as it only serves to hinder copy-pasting.   If it's an especially long bit of code, post it to a Pastebin.

restart:
oh, i see...i'm apologize...thanx for the info ;D

Navigation

[0] Message Index

Go to full version