Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: howardh on August 15, 2008, 01:58:02 AM

Title: Compiling a plugin
Post by: howardh on August 15, 2008, 01:58:02 AM
http://www.rockbox.org/tracker/task/8768?histring=tuner

I found this plugin a while ago but only the source code is available for download. I don't think it's complete but it seems to me that it's at least functional. How do I compile this plugin?
Title: Re: Compiling a plugin
Post by: Llorean on August 15, 2008, 01:59:04 AM
See the SimpleGuideToCompiling wiki page.
Title: Re: Compiling a plugin
Post by: howardh on August 15, 2008, 02:05:52 AM
http://www.rockbox.org/twiki/bin/view/Main/SimpleGuideToCompiling

This one? It only tells me how to compile the whole thing, which I've already tried and ended up with this:

Quote
menus/main_menu.c: In function ‘info_getname’:
menus/main_menu.c:256: error: ‘LANG_DISK_NAME_INTERNAL’ undeclared (first use in this function)
menus/main_menu.c:256: error: (Each undeclared identifier is reported only once
menus/main_menu.c:256: error: for each function it appears in.)
menus/main_menu.c:275: error: ‘LANG_NOT_PRESENT’ undeclared (first use in this function)
menus/main_menu.c: In function ‘info_speak_item’:
menus/main_menu.c:365: error: ‘LANG_DISK_NAME_INTERNAL’ undeclared (first use in this function)
menus/main_menu.c:385: error: ‘LANG_NOT_PRESENT’ undeclared (first use in this function)
make[1]: *** [/home/howard/rockbox/build/apps/menus/main_menu.o] Error 1
make: *** [build] Error 2

Title: Re: Compiling a plugin
Post by: Llorean on August 15, 2008, 02:08:58 AM
You need to compile the whole thing with the plugin for the plugin to be able to work.

Did you use SVN to check out the sources or did you download the source tarball?
Title: Re: Compiling a plugin
Post by: howardh on August 15, 2008, 02:10:53 AM
I tried both and had the same result from both.

To compile the plugin with the rest of it, do I just place the .c file in the plugin folder?
Title: Re: Compiling a plugin
Post by: Llorean on August 15, 2008, 02:12:50 AM
You'll need to give more information then. What SVN revision does SVN report you have, what environment are you compiling in (Linux, Cygwin, etc), what target are you compiling for, what patches have you tried to apply, what changes have you made?

The official sources don't have this error, so we need to figure out what you've done that is causing it.

To compile a plugin you'll need to add the plugin to the SOURCES file in the plugin folder as well as having it's c file present there.
Title: Re: Compiling a plugin
Post by: howardh on August 15, 2008, 02:16:14 AM
Quote
Checked out revision 18281.

Ubuntu

No patches

no changes other than adding pitch.c to the plugin folder
Title: Re: Compiling a plugin
Post by: Llorean on August 15, 2008, 02:19:10 AM
Could you re-check out the source in a new location then make a build folder and attempt to compile and paste a log of that whole session to pastebin.ca?
Title: Re: Compiling a plugin
Post by: howardh on August 15, 2008, 02:44:30 AM
Alright, it's building. It should be done in about half an hour.

edit:
Or not... It's done and works. I'll try with pitch.c and post the results here.

edit 2:
It works now. How do I get pitch.c to compile with the rest? It doesn't seem to be there with the rest of the .rock files.
Title: Re: Compiling a plugin
Post by: Llorean on August 15, 2008, 02:45:06 AM
Did you add it to SOURCES like I said above?
Title: Re: Compiling a plugin
Post by: howardh on August 15, 2008, 02:46:17 AM
Ah, I didn't see the edit. I'll do that.

edit:
I got it working. Thanks.