Pages: [1]   Go Down
Author Topic: 0017 Mac OS X Library name conflict?  (Read 519 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, my first post here - sorry it has to be about a problem.

I'm on Mac OSX 10.5.7 using Arduino 0017. My Sketchbook is in ~/Documents/Arduino/ and my libraries are in ~/Documents/Arduino/libraries.

I've installed the MIDI Library here on arduino.cc and changed the name of the unzipped folder from MIDI to MIDI_FF. Both example .pde files compile with no problems.

I've recently installed a second, completely different MIDI library from some friends of mine. I've changed the name of the new unzipped folder from MIDI to MIDI_JP.

Both libraries contain files called MIDI.h and MIDI.cpp (but have different path names) - and when I try to compile the two examples that come with the Arduino MIDI Library - I now get errors.

The MIDI Library from my friends compiles with no problems.

If I remove my friends MIDI library from my libraries folder - the Arduino MIDI library examples compile again.

Considering I'd like to have access to both libraries - how do I fix this?

Thanks in advance,

J
Logged

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

You need to change the name of one of the header files (and modify the .c / .cpp files to #include the new name).  The Arduino environment uses the names of the header files you include in your sketch to decide which libraries to link in.  
Logged

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

Thanks Mellis - that's pretty much what I figured/was hoping.

Appreciated.

J
Logged

Pages: [1]   Go Up
Jump to: