Go Down

Topic: Compile error  (Read 864 times) previous topic - next topic

Voel

Hi, My name is Leo and I am new to this forum and new to arduino too.

I get a compile error when trying to upload the attached file to an Arduino Mega. Below you see the error message

Hope somebody can help me out.

Thank you in advance.


Error message:

Arduino: 1.8.4 (Windows 10), Board:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\FLiGH  HiGH\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=0X2341_0X0042 -ide-version=10804 -build-path C:\Users\FLIGHH~1\AppData\Local\Temp\arduino_build_252979 -warnings=all -build-cache C:\Users\FLIGHH~1\AppData\Local\Temp\arduino_cache_599458 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\FLiGH  HiGH\Documents\Arduino737-master\Arduino737\Arduino737.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\FLiGH  HiGH\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -vid-pid=0X2341_0X0042 -ide-version=10804 -build-path C:\Users\FLIGHH~1\AppData\Local\Temp\arduino_build_252979 -warnings=all -build-cache C:\Users\FLIGHH~1\AppData\Local\Temp\arduino_cache_599458 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\FLiGH  HiGH\Documents\Arduino737-master\Arduino737\Arduino737.ino
Using board 'mega' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

WAARSCHUWING: Categorie '' in bibliotheek EEPROM is niet geldig. Wordt gewijzigd naar 'Uncategorized'
Build-opties gewijzigd, alles wordt opnieuw gebuild

Detecting libraries used...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\mega" "C:\Users\FLIGHH~1\AppData\Local\Temp\arduino_build_252979\sketch\Arduino737.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\mega" "-IC:\Users\FLiGH  HiGH\Documents\Arduino\libraries\LedControl-1.0.6\src" "C:\Users\FLIGHH~1\AppData\Local\Temp\arduino_build_252979\sketch\Arduino737.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\mega" "-IC:\Users\FLiGH  HiGH\Documents\Arduino\libraries\LedControl-1.0.6\src" "C:\Users\FLIGHH~1\AppData\Local\Temp\arduino_build_252979\sketch\Arduino737.ino.cpp" -o "C:\Users\FLIGHH~1\AppData\Local\Temp\arduino_build_252979\preproc\ctags_target_for_gcc_minus_e.cpp"

C:\Users\FLiGH  HiGH\Documents\Arduino737-master\Arduino737\Arduino737.ino:3:24: fatal error: LedControl.h: No such file or directory

#include <LedControl.h>

                       ^

compilation terminated.

Bibliotheek LedControl-1.0.6 op versie 1.0.6 in map: C:\Users\FLiGH  HiGH\Documents\Arduino\libraries\LedControl-1.0.6  wordt gebruikt
exit status 1
Fout bij het compileren voor board Arduino/Genuino Mega or Mega 2560




Delta_G

#1
Dec 06, 2017, 01:04 am Last Edit: Dec 06, 2017, 01:04 am by Delta_G
C:\Users\FLiGH  HiGH\Documents\Arduino737-master\Arduino737\Arduino737.ino:3:24: fatal error: LedControl.h: No such file or directory

It doesn't get much clearer than that.  Have you installed that library?  How and where?
If at first you don't succeed, up - home - sudo - enter.

Voel

Thank you for replying. The library is installed in C:\Users\FLiGH  HiGH\Documents\Arduino\libraries

The installation of the library went via the menu: add .zip library

Delta_G

#3
Dec 06, 2017, 01:21 am Last Edit: Dec 06, 2017, 01:21 am by Delta_G
OK, when you look at that folder what's in it?  What filenames?  The folder doesn't have "Master" added to the end of the name does it?
If at first you don't succeed, up - home - sudo - enter.

Voel

There are all folders in this folder:

EEPROM
Encoder-1.4.1
Ethernet-1.1.2
LedControl
readme.txt

There is no ""Master"" added to the folder

Delta_G

What's inside LedControl is what I was getting at. 
If at first you don't succeed, up - home - sudo - enter.

Voel

Inside LedControl:

Folder - examples
Folder - src

kewords.txt
library.properties
LICENSE

Delta_G

#7
Dec 06, 2017, 01:39 am Last Edit: Dec 06, 2017, 01:39 am by Delta_G
What's inside src?

We're looking for LedControl.h and LedControl.cpp  in case you find it somewhere else.
If at first you don't succeed, up - home - sudo - enter.

Voel

Both files LedControl.cpp and LedControl.h are in the src folder

Delta_G

cut them from that folder and paste them one level up in that LedControl folder.  See if it compiles now. 
If at first you don't succeed, up - home - sudo - enter.

pert

There are all folders in this folder:
...
LedControl
The IDE output you posted contradicts you:
Bibliotheek LedControl-1.0.6 op versie 1.0.6 in map: C:\Users\FLiGH  HiGH\Documents\Arduino\libraries\LedControl-1.0.6  wordt gebruikt
That translates to
Code: [Select]
Using library LedControl-1.0.6 at version 1.0.6 in folder: C:\Users\FLiGH  HiGH\Documents\Arduino\libraries\LedControl-1.0.6
This is strange that it says the library was used but also that it can't find LedControl.h.

Voel

I have fixed it! Thank you very much for your help. I have copied the library files to:

C:\Program Files (x86)\Arduino
Deleted the files in folder  C:\Users\FLiGH  HiGH\Documents\Arduino\libraries

That did the job.

Thanks for your help

pert

It's a bad idea to install libraries to C:\Program Files (x86)\Arduino because they will all be lost whenever you update to a different version of the Arduino IDE, then you'll be trying to figure out why none of your projects will compile with the new IDE version.

Voel

Oke, that is not good indeed, but what is the best place to put the files in? 

pert

Always install libraries to the libraries subfolder of your sketchbook folder. You can find/set the location of the sketchbook folder in the Arduino IDE at File > Preferences > Sketchbook location.

Go Up