Having Trouble Using Addons

Using OF 0.05 on Windows XP with CodeBlocks

I’m building a program-based-on-the-MoviePlayer-example, but I wanted to use the ofxdirlist addon with it. I made a copy of the MoviePlayer example and renamed all of the appropriate files to the new project name. I then opened up the ofxdirlist example project and saw what I thought I needed to add to my project.

In CodeBlocks, I right-clicked on my new project and selected add files to project. I went several levels back up the directory tree, located …\addons\ofxDirList\src, and added the two files. When prompted, I indicated that the files should be added to both the debug and release targets.

A blue folder named “addons” appeared in my project which (except for the color blue) was identical to the path structure I saw in the ofxdirlist example that came with OF.

Next, I opened my testApp.h file and pasted in the following from the ofxdirlist example:
#define OF_ADDON_USING_OFXDIRLIST
#include “ofAddons.h”

I then added the following member variable to the testApp class declaration:
ofxDirList DIR

When I attempt to build the project, I get the following errors:
…\addons\ofAddons.h|19|ofxDirList.h: No such file or directory|
C:\of_preRelease_v0.05_windows_cb_FAT\apps\examples\juxtaposition_v1\src\testApp.h|33|error: `ofxDirList’ does not name a type|
||=== Build finished: 2 errors, 0 warnings ===|

  1. Is there something special I need to do to enable the addons when I use a codeblocks project that wasn’t originally created with addons enabled?

  2. What is reading the install.xml file I see in the ofxdirlist directory? Do I need to configure something in codeblocks to deal with this?

thanks,

Michael

Hey - there is one more step :slight_smile:
Codeblocks isn’t smart enough to add the paths of the files to its search paths. So you still need to tell it where to find the files.

Right click on the project in the sidebar (juxtaposition_v1)
Select build options.
Make sure “all configurations” is selected instead of Debug or Release
Then go to search paths
Add the path to the the ofxDirList/src/ folder. I think it should be "…\addons\ofxDirList\src "

Now it should be able to find the files.

Theo