Go Down

Topic: [SOLVED] - Need help locating and placing libraries in correct location...LINUX (Read 2 times) previous topic - next topic

omid429

Hello All. I have recently gotten an Arduino and did a few examples on my windows PC but have moved over to Linux. I installed the Arduino program and tried one of the example NFC programs. Every time I try to compile, I get a fatal error of "Adafruit_NFCShield_I2C.h" not found. So I copied it from the download folder into a folder I called "libraries" within my sketchbook folder. Still no joy. It finds the Wire.h library but I for the life of me cannot find where Arduino stores its libraries that installed when I installed the program. I am using Ubuntu 12.10.

There are two questions I have. The first being that if I made the libraries folder in my sketchbook folder and installed both the .cpp and .h for the NFC, why is not finding it. If I am supposed to put it in the libraries folder where linux stored the other libraries, where do I find the installation location so that can be done.

Thanks in advance for your help.

WizenedEE

give us the result of "find <your sketchbook directory>/libraries"

(a portion of) mine looks like this:
Code: [Select]

arduino/libraries/
arduino/libraries/AFMotor
arduino/libraries/AFMotor/keywords.txt
arduino/libraries/AFMotor/AFMotor.h
arduino/libraries/AFMotor/AFMotor.cpp
arduino/libraries/AFMotor/examples
arduino/libraries/AFMotor/examples/MotorTest
arduino/libraries/AFMotor/examples/MotorTest/MotorTest.pde
arduino/libraries/AFMotor/examples/AFMotor_MultiStepper
arduino/libraries/AFMotor/examples/AFMotor_MultiStepper/AFMotor_MultiStepper.pde
arduino/libraries/AFMotor/examples/StepperTest
arduino/libraries/AFMotor/examples/StepperTest/StepperTest.pde
arduino/libraries/AFMotor/examples/MotorParty
arduino/libraries/AFMotor/examples/MotorParty/MotorParty.pde
arduino/libraries/AFMotor/examples/AFMotor_ConstantSpeed
arduino/libraries/AFMotor/examples/AFMotor_ConstantSpeed/AFMotor_ConstantSpeed.pde
arduino/libraries/AFMotor/README.txt
arduino/libraries/RunningMedian
arduino/libraries/RunningMedian/RunningMedian.cpp
arduino/libraries/RunningMedian/RunningMedian.h
arduino/libraries/LEDGroup
arduino/libraries/LEDGroup/LEDGroup.h
arduino/libraries/LEDGroup/examples
arduino/libraries/LEDGroup/examples/DemonstrateAll
arduino/libraries/LEDGroup/examples/DemonstrateAll/DemonstrateAll.ino
arduino/libraries/LEDGroup/examples/DemonstrateAll/Makefile
arduino/libraries/TimerOne
arduino/libraries/TimerOne/TimerOne.h
arduino/libraries/TimerOne/TimerOne.cpp
arduino/libraries/CircleBot
arduino/libraries/CircleBot/CircleBot.h
arduino/libraries/CircleBot/CircleBot.cpp
arduino/libraries/RunEvery
arduino/libraries/RunEvery/RunEvery.h
arduino/libraries/IRRemote
arduino/libraries/IRRemote/IRRemote.o
arduino/libraries/IRRemote/includes
arduino/libraries/IRRemote/includes/IRButtonNameDefinitions.h
arduino/libraries/IRRemote/includes/IRButtonNameDeclarations.h
arduino/libraries/IRRemote/examples
arduino/libraries/IRRemote/examples/Print_Buttons
arduino/libraries/IRRemote/examples/Print_Buttons/Print_Buttons.pde
arduino/libraries/IRRemote/example_codes.h
arduino/libraries/IRRemote/IRRemote.h
arduino/libraries/IRRemote/IRRemote.cpp
arduino/libraries/RunningPercentile
arduino/libraries/RunningPercentile/RunningPercentile.cpp
arduino/libraries/RunningPercentile/RunningPercentile.h
arduino/libraries/DS1307RTC
arduino/libraries/DS1307RTC/DS1307RTC.h
arduino/libraries/DS1307RTC/keywords.txt
arduino/libraries/DS1307RTC/DS1307RTC.cpp
arduino/libraries/DS1307RTC/readme.txt
arduino/libraries/IRRemote2
arduino/libraries/IRRemote2/examples
arduino/libraries/IRRemote2/examples/Print_Buttons
arduino/libraries/IRRemote2/examples/Print_Buttons/Print_Buttons.pde
arduino/libraries/IRRemote2/IRRemote.h
arduino/libraries/IRRemote2/IRRemote.cpp
arduino/libraries/Jaguar
arduino/libraries/Jaguar/Jaguar.h

omid429

Thank you. Just looking at your paste answered my question. I was placing the .h file directly in my libraries folder and not a sub-folder within libraries. I am running now. :) Most appreciated.

rccarroll

I also had a problem with libraries in Linux, and failure to compile.  Some specifics:
Arduino:Uno
OS:  Linux Mint 14
IDE version:  1.0.3 (upgraded from 1.0.1)

Once I put the user into the right group, simple programs compile, download, and produce expected results on the serial monitor.  That seems to indicate that everything is fine, until I start to use libraries.  Simple programs like "hello world" and producing an ASCII table work well.

When I try to use libraries, compiles fail, with lots of error messages. Library files are both a header and a c++ file in what look like appropriate locations.  
The tree linux program produces:


rc@cerebralcortex ~ $ tree /usr/share/arduino/libraries/usr/share/arduino/libraries
??? Adafruit
?   ??? Adafruit_GFX.cpp
?   ??? Adafruit_GFX.h
?   ??? Adafruit_LEDBackpack.cpp
?   ??? Adafruit_LEDBackpack.h
?   ??? Wire.h
?   -- clipped -- to reduce size -- (unessential libraries are present but not listed)
??? Wire
    ??? examples
    ?   ??? digital_potentiometer
    ?   ?   ??? digital_potentiometer.ino
    ?   ??? master_reader
    ?   ?   ??? master_reader.ino
    ?   ??? master_writer
    ?   ?   ??? master_writer.ino
    ?   ??? SFRRanger_reader
    ?   ?   ??? SFRRanger_reader.ino
    ?   ??? slave_receiver
    ?   ?   ??? slave_receiver.ino
    ?   ??? slave_sender
    ?   ??? slave_sender.ino
    ??? keywords.txt
    ??? utility
    ?   ??? twi.c
    ?   ??? twi.h
    ??? Wire.cpp
    ??? Wire.h

108 directories, 170 files
---------------------------------------------------------------
and


rc@cerebralcortex ~/sketchbook $ tree
.
??? Adafruit_7_SegmntDisplayTest_1_Display
?   ??? Adafruit_7_SegmntDisplayTest_1_Display.ino
??? HelloWorld
?   ??? HelloWorld.ino
??? HereIsSomeMath
?   ??? HereIsSomeMath.ino
??? libraries
?   ??? Adafruit_GFX
?   ?   ??? Adafruit_GFX.cpp
?   ?   ??? Adafruit_GFX.h
?   ?   ??? glcdfont.c
?   ?   ??? license.txt
?   ?   ??? README.html
?   ?   ??? readme.txt
?   ??? Adafruit_LEDBackpack
?   ?   ??? Adafruit_LEDBackpack.cpp
?   ?   ??? Adafruit_LEDBackpack.h
?   ?   ??? glcdfont.c
?   ?   ??? README.htm
?   ?   ??? readme.txt
?   ?   ??? README.txt
?   ??? Wire
?   ??? examples
?   ?   ??? digital_potentiometer
?   ?   ?   ??? digital_potentiometer.ino
?   ?   ??? master_reader
?   ?   ?   ??? master_reader.ino
?   ?   ??? master_writer
?   ?   ?   ??? master_writer.ino
?   ?   ??? SFRRanger_reader
?   ?   ?   ??? SFRRanger_reader.ino
?   ?   ??? slave_receiver
?   ?   ?   ??? slave_receiver.ino
?   ?   ??? slave_sender
?   ?   ??? slave_sender.ino
?   ??? keywords.txt
?   ??? utility
?   ?   ??? twi.c
?   ?   ??? twi.h
?   ??? Wire.cpp
?   ??? Wire.h
??? NSB_Timer
?   ??? NSB_Timer.ino
??? sevenseg
?   ??? sevenseg.ino
??? timer
. ??? timer.ino


Adafruit tech support suspected a mislocated Wire program, but it appears to be in the correct place.  I have two versions of the file Wire.h and two versions of Wire.cpp, and both have been checked.

Further details, including error dumps are at:

http://forums.adafruit.com/viewtopic.php?f=22&t=36991&p=183060#p183060 so I won't waste too much space.  As you can see, I started over on the Adafruit forums, but they didn't have much Linux experience, and suggested this forum.  Thanks in advance for the help.


Go Up