Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using NeoPixel Library and ALA Library in the same sketch #4

Open
tristandoo opened this issue Oct 14, 2015 · 2 comments
Open

Using NeoPixel Library and ALA Library in the same sketch #4

tristandoo opened this issue Oct 14, 2015 · 2 comments
Labels

Comments

@tristandoo
Copy link

When using both libraries upon compiling the following errors occur:

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Uno"

ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:38: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::~Adafruit_NeoPixel()'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::~Adafruit_NeoPixel()'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::begin()'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::show()'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::setPin(unsigned char)'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::setPixelColor(unsigned int, unsigned char, unsigned char, unsigned char)'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::setPixelColor(unsigned int, unsigned long)'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::Color(unsigned char, unsigned char, unsigned char)'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::getPixelColor(unsigned int) const'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::getPixels() const'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::numPixels() const'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::setBrightness(unsigned char)'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::getBrightness() const'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned int, unsigned char, unsigned char)': C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36: multiple definition ofAdafruit_NeoPixel::clear()'
Adafruit NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51: first defined here
collect2.exe: error: ld returned 1 exit status

Error compiling.

Tried tweaking the .cpp file my self, but I never got it to compile without errors.

@bportaluri
Copy link
Owner

I don't think this is possible because ALA is using NeoPixel library
internally so there are many conflicts.
If you need to access NeoPixel directly you can try to use the embedded one
instead add including another one.
Il 14 ott 2015 11:39 PM, "Tristan Van Tine" [email protected] ha
scritto:

When using both libraries upon compiling the following errors occur:

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Uno"

ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::Adafruit_NeoPixel(unsigned int,
unsigned char, unsigned char)'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:38:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::Adafruit_NeoPixel(unsigned int,
unsigned char, unsigned char)'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::~Adafruit_NeoPixel()'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::~Adafruit_NeoPixel()'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::begin()'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::show()'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::setPin(unsigned char)'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::setPixelColor(unsigned int,
unsigned char, unsigned char, unsigned char)'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::setPixelColor(unsigned int,
unsigned long)'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::Color(unsigned char, unsigned
char, unsigned char)'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::getPixelColor(unsigned int)
const'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::getPixels() const'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::numPixels() const'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::setBrightness(unsigned char)'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::getBrightness() const'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
ALA\ExtNeoPixel.cpp.o: In function Adafruit_NeoPixel::Adafruit_NeoPixel(unsigned
int, unsigned char, unsigned char)':
C:\Users\School\Documents\Arduino\libraries\ALA-master\src/ExtNeoPixel.cpp:36:
multiple definition ofAdafruit_NeoPixel::clear()'
Adafruit
NeoPixel\Adafruit_NeoPixel.cpp.o:C:\Users\School\Documents\Arduino\libraries\Adafruit_NeoPixel-master/Adafruit_NeoPixel.cpp:51:
first defined here
collect2.exe: error: ld returned 1 exit status

Error compiling.

Tried tweaking the .cpp file my self, but I never got it to compile
without errors.


Reply to this email directly or view it on GitHub
#4.

@tristandoo
Copy link
Author

How do you suggest to do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants