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

problem with library that has a c++ header file but random c files in src #21

Open
soldair opened this issue Jun 14, 2014 · 2 comments
Open

Comments

@soldair
Copy link
Contributor

soldair commented Jun 14, 2014

I'm trying to figure it out but i'm pretty new to this whole thing so any advice would be great.

I'm working on getting all of the library-pinoccio deps setup for npm but not quite there yet.

This is lib in question https://github.com/Pinoccio/library-bitlash . If you try it check #20 i had to rename package.json so it would work.

"/home/soldair/arduino_nightly/arduino-avr-toolchain-nightly-gcc-4.8.1/hardware/tools/avr/bin/avr-gcc" -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega256rfr2 -DF_CPU=16000000L -DARDUINO= -DARDUINO_PINOCCIO -DARDUINO_ARCH_AVR  -std=gnu99 -DARDUINO=156 -D__PROG_TYPES_COMPAT__ -I"/home/soldair/arduino_nightly/arduino-avr-toolchain-nightly-gcc-4.8.1/hardware/arduino/avr/cores/arduino" -I"/home/soldair/arduino_nightly/arduino-avr-toolchain-nightly-gcc-4.8.1/hardware/arduino/avr/variants/pinoccio" -I"/home/soldair/arduino_nightly/arduino-avr-toolchain-nightly-gcc-4.8.1/hardware/pinoccio/avr/variants/pinoccio" -I"/home/soldair/Projects/pinoccio/firmware-pinoccio/hardware/pinoccio/avr/variants/pinoccio" -I"node_modules/bitlash.ino/src" "/home/soldair/Projects/opensource/leotest/Bootstrap/node_modules/bitlash.ino/src/bitlash-api.c" -o ".build/bitlash-api.o"
In file included from /home/soldair/Projects/opensource/leotest/Bootstrap/node_modules/bitlash.ino/src/bitlash-api.c:36:0:
/home/soldair/Projects/opensource/leotest/Bootstrap/node_modules/bitlash.ino/src/bitlash.h:596:22: error: expected ';', ',' or ')' before '&' token
 void sp(const String &);
                      ^
/home/soldair/Projects/opensource/leotest/Bootstrap/node_modules/bitlash.ino/src/bitlash.h:597:6: error: conflicting types for 'sp'
 void sp(char);
      ^
/home/soldair/Projects/opensource/leotest/Bootstrap/node_modules/bitlash.ino/src/bitlash.h:595:6: note: previous declaration of 'sp' was here
 void sp(const char *);
      ^
/home/soldair/Projects/opensource/leotest/Bootstrap/node_modules/bitlash.ino/src/bitlash.h:598:6: error: conflicting types for 'sp'
 void sp(unsigned char);

also i dont know why but '-DARDUINO= ' is not templating correctly so i added it to extras for now in board pinoccio. this board module design is working out well so far =)

@AdamMagaluk
Copy link
Owner

The -DARDUINO= issue should be fixed in the lastest code. This was causing a bunch of issues in this lib.

Now the issue im seeing is it not finding Serial defined.

leo build -b uno -v 2
Cleaning build directory
Creating new build directory
Dependency tty.js does not exist. Try running `npm install`
Dependency optimist does not exist. Try running `npm install`
Building bitlash as library.
"/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc" -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=156 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   -I"/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino" -I"/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/variants/standard" -I"src" "/Users/ApigeeCorporation/Software/leo/LibraryBitlash/src/bitlash-api.c" -o ".build/bitlash-api.o"
Command failed: /Users/ApigeeCorporation/Software/leo/LibraryBitlash/src/bitlash-api.c: In function 'initBitlash':
/Users/ApigeeCorporation/Software/leo/LibraryBitlash/src/bitlash-api.c:58: error: 'Serial' undeclared (first use in this function)
/Users/ApigeeCorporation/Software/leo/LibraryBitlash/src/bitlash-api.c:58: error: (Each undeclared identifier is reported only once
/Users/ApigeeCorporation/Software/leo/LibraryBitlash/src/bitlash-api.c:58: error: for each function it appears in.)

Command failed: /Users/ApigeeCorporation/Software/leo/LibraryBitlash/src/bitlash-api.c: In function 'initBitlash':
/Users/ApigeeCorporation/Software/leo/LibraryBitlash/src/bitlash-api.c:58: error: 'Serial' undeclared (first use in this function)
/Users/ApigeeCorporation/Software/leo/LibraryBitlash/src/bitlash-api.c:58: error: (Each undeclared identifier is reported only once
/Users/ApigeeCorporation/Software/leo/LibraryBitlash/src/bitlash-api.c:58: error: for each function it appears in.)

@soldair
Copy link
Contributor Author

soldair commented Jun 19, 2014

ill pull and try it out tonight

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

No branches or pull requests

2 participants