Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Pages: [1]   Go Down
Author Topic: Library Fails to build  (Read 504 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok so I followed the example at
http://www.arduino.cc/en/Hacking/LibraryTutorial
Still I cannot get a .o file generated

Here is what I have done:
I cut and pasted the files from the website
I put them in hardware/libraries/Morse for Arduino 10
Restarted Arduino 10
Switched board types
Restarted Arduino 10
Still I cannot get a .o file generated

I put them in lib\targets\libraries\Morse for Arduino 9
I Restarted Arduino 9
Switched board types
Restarted Arduino 9
Still I cannot get a .o file generated

Running Windows XP 2 Pro

Help
Thanks
Kirk

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 40
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you got .h and .cpp files? I've just been building some pretty complex libraries and they build no problem. I put them in a directory under libraries in their own folder and they build automatically using winxp sp2 pro. Here is what I do:

1. make library directory under arduino_dir/hardware/libraries/your_lib_name
2. place the .h and .cpp files
3. start arduino
4. libs are automatically built.

You could try placing an error in the library code and you should get an error message in the console in arduino. If you don't then it can't find the lib for some reason. Other option is to move the whole arduino directory into another folder. I read another thread on here and they had to put it into their program files directory to get it to work.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well well, I was very careful but I still missed one important detail.  I had the .cpp file ending in .pde

I inserted the command "boguscommand" and finally got an error!  Upon removing "boguscommand" I got, as expected, a good build and the code runs.

Thanks for all your help.  Now I have a foundation to work from.
Kirk
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome, glad you got it working.  I should add a warning about that to the tutorial.  I also uploaded a .zip with the complete library, so you won't have to copy and paste each file if you just want to try the whole thing.
Logged

Pages: [1]   Go Up
Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Jump to: