Pages: [1]   Go Down
Author Topic: BUG in Arduino IDE 1.0.1 and 1.0.2 when you have a library with name Arduino  (Read 964 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Edison Member
*
Karma: 58
Posts: 1723
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
I have a library with the name Arduino that mimics some arduino functionality on the PC. This allows me to swap code easily from Arduino to PC and back for debugging. (There must be a thread on this one somewhere)
Now when I compiled the ArduinoISP with Arduino IDE 1.0.1 (I normally use eclipse) I found the sketch not to compile.
Looking at the compile instructions I saw my PC arduino library was include in the include path. This obviously leads to errors.
So I renamed the folder name to arduino2 which worked.
Then I switched to Arduino IDE 1.0.2 (as there is a bug in the ArduinoISP in 1.0.1) and compiled again with the same problem.
I renamed the folder to _rduino2. It compiled fine.
Then I compiled ArduinoISP again (to upload to a duemilenove with bootloader UNO board; to burn the uno bootloader on the duemilenove used to burn the others) The code does not compile. Arduino IDE 1.0.2 includes the _rduino2 library  smiley-eek
Which is what you can see in the output below
Code:
D:\arduino-1.0.2\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p
-DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=102 -ID:\arduino-1.0.2\hardware\arduino\cores\arduino
-ID:\arduino-1.0.2\hardware\arduino\variants\standard [b]-ID:\Users\ADMIN\Documents\Arduino\libraries\_rduino[/b]2
c:\temp\build470761691085110121.tmp\ArduinoISP.cpp -o c:\temp\build470761691085110121.tmp\ArduinoISP.cpp.o
ArduinoISP.ino: In function 'void universal()':
ArduinoISP.ino:279: warning: unused variable 'w'
ArduinoISP.ino: In function 'int avrisp()':
ArduinoISP.ino:551: warning: no return statement in function returning non-void
ArduinoISP.ino:551: warning: control reaches end of non-void function
D:\arduino-1.0.2\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L
-MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=102 -ID:\arduino-1.0.2\hardware\arduino\cores\arduino
-ID:\arduino-1.0.2\hardware\arduino\variants\standard [b]-ID:\Users\ADMIN\Documents\Arduino\libraries\_rduino2[/b]
[b]-ID:\Users\ADMIN\Documents\Arduino\libraries\_rduino2\utility[/b] D:\Users\ADMIN\Documents\Arduino\libraries\_rduino2\Arduino.cpp -o [b]
c:\temp\build470761691085110121.tmp\_rduino2\Arduino.cpp[/b].o
D:\Users\ADMIN\Documents\Arduino\libraries\_rduino2\Arduino.cpp:4: error: 'SYSTEMTIME' does not name a type
D:\Users\ADMIN\Documents\Arduino\libraries\_rduino2\Arduino.cpp:5: error: 'FILETIME' does not name a type
D:\Users\ADMIN\Documents\Arduino\libraries\_rduino2\Arduino.cpp:6: error: 'LARGE_INTEGER' does not name a type
D:\Users\ADMIN\Documents\Arduino\libraries\_rduino2\Arduino.cpp: In function 'void arduino_init()':

 smiley-eek I renamed the folder and the included files but it looks as if once the IDE found it he just uses it. smiley-eek
Code:
D:\arduino-1.0.2\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p
-DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=102 -ID:\arduino-1.0.2\hardware\arduino\cores\arduino -ID:\arduino-1.0.2\hardware
\arduino\variants\standard [b]-ID:\Users\ADMIN\Documents\Arduino\libraries\_r_u_no2[/b] c:\temp\build2067151088400352194.tmp\ArduinoISP.cpp -o
c:\temp\build2067151088400352194.tmp\ArduinoISP.cpp.o
ArduinoISP.ino: In function 'void universal()':
ArduinoISP.ino:279: warning: unused variable 'w'
ArduinoISP.ino: In function 'int avrisp()':
ArduinoISP.ino:551: warning: no return statement in function returning non-void
ArduinoISP.ino:551: warning: control reaches end of non-void function
D:\arduino-1.0.2\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L
-MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=102 -ID:\arduino-1.0.2\hardware\arduino\cores\arduino
-ID:\arduino-1.0.2\hardware\arduino\variants\standard -ID:\Users\ADMIN\Documents\Arduino\libraries\[b]_r_u_no2[/b]
-ID:\Users\ADMIN\Documents\Arduino\libraries\[b]_r_u_no2[/b]\utility D:\Users\ADMIN\Documents\Arduino\libraries\[b]_r_u_no2[/b]\consoleSerial.cpp -o
c:\temp\build2067151088400352194.tmp\[b]_r_u_no[/b]2\consoleSerial.cpp.o
In file included from D:\Users\ADMIN\Documents\Arduino\libraries\_r_u_no2\consoleSerial.cpp:1:
D:\Users\ADMIN\Documents\Arduino\libraries\_r_u_no2/consoleSerial.h:6:20: warning: iostream: No such file or directory
In file included from D:\Users\ADMIN\Documents\Arduino\libraries\[b]_r_u_no2[/b]\consoleSerial.cpp:1:

As to me there are 2 bugs here.
1) Arduino IDE should never include a library if not explicitly asked.
2) The behavior changes over time and as such is inconsistent.

I tried to reproduce with 1.5 but without success.

Best regards
Jantje

EDIT unfortunately the tags do not seem to work in a code section so the "special folders" do not stand out as desired.
« Last Edit: December 03, 2012, 03:56:55 pm by Jantje » Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Pages: [1]   Go Up
Jump to: