Rockbox Development > Starting Development and Compiling
Do I have to recompile all when I add a plugin? + 2 little questions
Runstars:
I made a little plugin helloworld such as in the HowToWritePlugins docs, and I am able to compile it under vmware but I want to know if each time I change my file, I'll have to recompile again the whole source code ... ???
I read the documentation but i didn't find the answer.
==========
I've also another question about what I have to put in my codes:
I try to write "PLUGIN_HEADER" in my helloworld.c file(like in the documentation) but during the compiling process, some errors happened. Why ?
==========
Finally, after the compiling (make), When I type "make install", like in the documentation, i got the following messages:
Installing your build in your '' dir
ERROR: No PREFIX given
make: ***[install] Error 255
What should I do to make it work ???
If anyone can help me it would be really appreciated :)
saratoga:
--- Quote from: Runstars on March 05, 2011, 02:39:26 PM ---I made a little plugin helloworld such as in the HowToWritePlugins docs, and I am able to compile it under vmware but I want to know if each time I change my file, I'll have to recompile again the whole source code ... ???
--- End quote ---
You can do "make plugins", but really if you just type make it'll only compile files that actually changed.
--- Quote from: Runstars on March 05, 2011, 02:39:26 PM ---I try to write "PLUGIN_HEADER" in my helloworld.c file(like in the documentation) but during the compiling process, some errors happened. Why ?
--- End quote ---
Post the log.
--- Quote from: Runstars on March 05, 2011, 02:39:26 PM ---Finally, after the compiling (make), When I type "make install", like in the documentation, i got the following messages:
Installing your build in your '' dir
ERROR: No PREFIX given
make: ***[install] Error 255
--- End quote ---
Is this a sim build? Make install only works if you're building the simulator. If its a device build, you have to do "make zip", then copy the build to your player.
Runstars:
thank you,
In the "Basics" section of the HowToWritePlugins:
http://www.rockbox.org/wiki/HowtoWritePlugins
it's write:
The basics
Let's start off by looking at helloworld.c. Read the comments in each line to see what they do.
#include "plugin.h"
This line is necessary for the plugin to make any function calls. Without it the plugin is fairly useless.
PLUGIN_HEADER
This macro should be called as the first thing you do in the plugin. It tests that the api version and model the plugin was compiled for matches the machine it is running on.
I don't understand how to use this PLUGIN_HEADER macro because when I write it like this in my code and I try to compile, I got these errors:
LD firsttest.rock
/home/user/rockbox/buildfuze/apps/plugins/plugin_crt0.o:(.header+0x0): multiple definition of `__header'
/home/user/rockbox/buildfuze/apps/plugins/firsttest.o:(.header+0x0): first defined here
/home/user/rockbox/buildfuze/apps/plugins/plugin_crt0.o:(.data+0x0): multiple definition of `rb'
/home/user/rockbox/buildfuze/apps/plugins/firsttest.o:(.data+0x0): first defined here
collect2: ld returned 1 exit status
make: *** [/home/user/rockbox/buildfuze/apps/plugins/firsttest.rock] Error 1
gbl08ma:
I THINK that some time ago (more than three months) ago, source code was changed and PLUGIN_HEADER is not needed anymore. At least, when I look at the source code of the actual official plugins I don't see any PLUGIN_HEADER declararion, and some time ago (last month) I tried to compile a old game patch from the tracker and it didn't compile until I removed the PLUGIN_HEADER line.
The documentation is, IMO, out-of-date and once I get confirmation that PLUGIN_HEADER is outdated, I'll update the documentation myself (I have a wiki account, it exists for something ;)) if nobody does it before me.
Runstars:
you're right, I checked too in the source code and there isn't PLUGIN_HEADER lines so I think that now, it doesn't make matter if we don't put this line. 8)
Navigation
[0] Message Index
[#] Next page
Go to full version