leo icon indicating copy to clipboard operation
leo copied to clipboard

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

Open soldair opened this issue 10 years ago • 2 comments

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 =)

soldair avatar Jun 14 '14 05:06 soldair

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.)

AdamMagaluk avatar Jun 19 '14 19:06 AdamMagaluk

ill pull and try it out tonight

soldair avatar Jun 19 '14 19:06 soldair