Rockbox Development > Starting Development and Compiling
New to Rockbox Development, Plugins?
safetydan:
The error you got there while building looks a little odd. Perhaps trying doing an update from SVN and then a clean build. So something like
cd "rockbox source directory"
svn update
cd "build directory"
make clean
make
and see what happens.
To actually get your plugin to compile, you'll need to add a line to apps/plugins/SOURCES with the name of your plugin's .c file. If you're familiar with C, you should be able to figure out where it goes in that file.
007quick:
Ok I understand now.
Unfortunetly I know nothing about adding files (though that is what you must do)
Now that you have explained it properly someone else will have to help you.
Sorry that I couldn't solve your problem! :-\
neoAKiRAz:
Ok! Now it compiled. The output for the update was
--- Code: ---U apps/plugins/credits.c
U manual/rockbox_interface/tagcache.tex
Updated to revision 12768.
--- End code ---
I didn't understand what was happened, but at least it's working now :)
And I managed to start debugging my plugin, thanks for the help, I may be back soon :P
Don't worry 007quick, and thanks again!
safetydan:
That output from SVN you posted is telling you that it updated (see the 'U' at the start of the line) two files. And now your copy of the source is the same as revision 12768 of the main repository.
neoAKiRAz:
I managed to compile my plugin (still with some warnings) but the my_plugin.rock file doens't appear in .rockbox/rocks of the unzipped 'make zip' zip file. Neither it apears in the plugin menu of the Sansa once I loaded it.
I'm not sure if I added the 'my_plugin.c' line in the correct place in the "rockbox/apps/plugins/SOURCES" file. I put it under "/* plugins common to all models */", but I'm not sure if it's ok. And furthermore, I may not be complying with some standards, if are there any... by now I'm just interested in making it work in my Sansa... the begining of my code is (there are some comments in spanish):
--- Code: ---#include "plugin.h"
/* GROSOR puede tener los valores 1,2,4,8,16 */
#define GROSOR 8
#define X_ARENA (LCD_WIDTH/GROSOR)
#define Y_ARENA (LCD_HEIGHT/GROSOR)
#define LEFT 0
#define RIGHT 1
#define UP 2
#define DOWN 3
#define DEFAULT_VEL 3
#define FRUTAS_POR_PANTALLA 100
#define ROJO LCD_RGBPACK(255,0,0)
#define BLANCO LCD_RGBPACK(255,255,255)
#define NEGRO LCD_RGBPACK(0,0,0)
#define X_INI 5
#define Y_INI 5
#define MAX_LENGTH 100
#define INIT_LENGTH 3
/* here is a global api struct pointer. while not strictly necessary,
it's nice not to have to pass the api pointer in all function calls
in the plugin */
static struct plugin_api* rb;
/* MIS DECLARACIONES DE TIPOS */
struct coord {
int x;
(...)
--- End code ---
The warnings, which I couldn't figure out, are:
--- Code: ---my_plugin.c:55: warning: function declaration isn't a prototype
my_plugin.c: In function 'plugin_start':
my_plugin.c:216: warning: implicit declaration of function 'TEST_PLUGIN_API'
--- End code ---
and those lines are:
--- Code: ---(...)
bool crecer;
};
/* FUNCIONES AUXILIARES */
int** CrearMundo() {
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version