IDE can?t fine library includes

I;m using the "softD1307" code in a project. If i use the example code it properly finds the library includes for "SoftI2cMaster". However when I move the code over to my project, the compiler complains that it cant; find SoftIc2Master.h TWIMaster.h.

If i copy the library code into my sketch directory all works fine. Normaly this would indicate (in a Makefile world) that I don't have the search paths set up, but I cant figure out how to force the IDE to do this.

You need to create a folder called libraries in your Arduino sketch directory and in there can be placed user library folders. Here is an example of where my user library folders are held so that the Arduino IDE can find them.

C:\Documents and Settings\Primary Windows User\My Documents\Arduino\libraries

9 Folders:

Button
DS1307
Flash
MsTimer2
Streaming
String
Tone
WString
__MACOSX

0 Files:

Lefty

I already have the SoftI2cMaster and TwiMaster libraries in the library directory

#include "some_lib.h"

... with double-quotes expects the file to be in the current folder.

#include <some_lib.h>

... with angle brackets will look for the file in a "libraries" folder.

Hope that's useful.

Prawnhead

Actually, in the C language, " means search local directories first, then the include path. <> (chickenlips) means to search only the include path. I have the includes correct. if this was a makefile i'd just add the -I to the CC invocation.

Where did you tell us what operating system you are using? Where did you tell us what version of the IDE you are using?

In the IDE, the Sketch + Import Library... menu item will list all libraries installed in the correct location(s). Are the libraries you are having difficulties with in that list?

Version 18 of the IDE, both Windows and MAC OSX. The libraries do not show up in the list, which is strange because for all the other libraries which are working, i just put the directories into the libraries directory.

Note, the softD1307 sample sketch finds the libraries correctly, but my sketch does not. Again.. quite weird. unfortunately I'm traveling and don't have the code with me at this time.

The simplest solution, then, is to note one of the library names that Sketch + Import Library... shows, and search on your computer for a folder with that name. Put the folders containing that libraries that you can't import into the folder that Import Library... can access.

It is in the directory where the others are. I think the problem is with including the files in a cpp file which i have as part of my sketch directory. I will experiment with some test.code

As i have made the softD1307 a library a set of objects and methods, I have named my file softD1307.cpp. With this, the paths are not found for the libraries. When I change the name to softD1307.pde i no longer get include errors. So something is strange in the IDE when the file is a cpp and how paths are searched.