Go Down

Topic: 0017 Mac OS X Library name conflict? (Read 552 times) previous topic - next topic

Jzone

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

mellis

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.  

Jzone

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

Appreciated.

J

Go Up