Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Do I have to recompile all when I add a plugin? + 2 little questions
« previous next »
  • Print
Pages: [1]

Author Topic: Do I have to recompile all when I add a plugin? + 2 little questions  (Read 2085 times)

Offline Runstars

  • Member
  • *
  • Posts: 16
Do I have to recompile all when I add a plugin? + 2 little questions
« 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 ... ???
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 :)
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Do I have to recompile all when I add a plugin? + 2 little questions
« Reply #1 on: March 05, 2011, 02:47:15 PM »
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 ... ???

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 ?

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

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.
Logged

Offline Runstars

  • Member
  • *
  • Posts: 16
Re: Do I have to recompile all when I add a plugin? + 2 little questions
« Reply #2 on: March 05, 2011, 03:35:20 PM »
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
Logged

Offline gbl08ma

  • Member
  • *
  • Posts: 249
    • My blog
Re: Do I have to recompile all when I add a plugin? + 2 little questions
« Reply #3 on: March 06, 2011, 08:24:54 AM »
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.
Logged
http://gbl08ma.com | http://i.tny.im

Offline Runstars

  • Member
  • *
  • Posts: 16
Re: Do I have to recompile all when I add a plugin? + 2 little questions
« Reply #4 on: March 06, 2011, 10:54:10 AM »
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)
Logged

Offline gbl08ma

  • Member
  • *
  • Posts: 249
    • My blog
Re: Do I have to recompile all when I add a plugin? + 2 little questions
« Reply #5 on: March 07, 2011, 01:46:31 PM »
It DOES matter. If you put that line, it won't compile ;)
Logged
http://gbl08ma.com | http://i.tny.im

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Do I have to recompile all when I add a plugin? + 2 little questions
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.242 seconds with 14 queries.