Arduino Forum

Using Arduino => Programming Questions => Topic started by: Transam98 on Mar 22, 2019, 05:12 pm

Title: Newbie Help...No such file or directory. Compilation terminated.
Post by: Transam98 on Mar 22, 2019, 05:12 pm
ok im a newbie here :) I keep getting a error... (when sending a file into the mega2560....Cant figure what im doing wrong ;( I think I have everything correct... it may be a directory problem...

If anyone can help Id REALLY appreciate it...

Im getting a error on a file (see title or pic below.)

I CAN see the FILE in a folder that is one LEVEL up...


the file/error: Adafruit_NeoPixel.h: No such file or directory

I can see it in the FOLDER one level up in C:\Users\Administrator\Documents\Arduino\libraries\NeoPixel

Im sure it may be or is a directory tree (folder location problem) but im not sure ;(

Thanks in advance
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: pert on Mar 22, 2019, 05:32 pm
What is your sketchbook folder set to in File > Preferences > Sketchbook location?
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: Transam98 on Mar 23, 2019, 04:05 am
@pert , thanks on the reply :)... just now saw it....
the location is:C:\Users\Administrator\Documents\Arduino

here is all the Folders etc....

C:\Users\Administrator\Documents\Arduino\pushbuttonlinein\Libraries\NeoPixel
C:\Users\Administrator\Documents\Arduino\pushbuttonlinein\Libraries\FastLED
C:\Users\Administrator\Documents\Arduino\pushbuttonlinein\Libraries
C:\Users\Administrator\Documents\Arduino\pushbuttonlinein (this folder has all of the INO Files for the project)
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: pert on Mar 23, 2019, 07:16 am
Libraries must be installed to the libraries subfolder of your sketchbook folder. In your case, that is C:\Users\Administrator\Documents\Arduino\libraries.

You need to copy C:\Users\Administrator\Documents\Arduino\pushbuttonlinein\Libraries\NeoPixel to C:\Users\Administrator\Documents\Arduino\libraries.
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: pert on Mar 23, 2019, 07:17 am
More information here:
https://www.arduino.cc/en/guide/libraries (https://www.arduino.cc/en/guide/libraries)
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: Transam98 on Mar 23, 2019, 05:46 pm
Ive looked at the link and dont see anything new....

The place I got the files from already had the library files... and I put there where the author said to...

so I still dont understand whats wrong ;( which sucks as ive spent a bit of $$ on this project hardware and all and have a paperweight ;(

This is where the project is from and it has the link to all the files in the description...


https://www.youtube.com/watch?v=Ct2aSvVlego
& the files are under MORE INFO
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: UKHeliBob on Mar 23, 2019, 05:59 pm
Please can you post the code that you are trying to compile and the full error messages that you get

Please read this before posting a programming question (http://forum.arduino.cc/index.php?topic=97455.0)
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: Transam98 on Mar 23, 2019, 06:14 pm
ok here goes let me know if im missing something :)
I RT click the file named: pushbuttonlinein.ino
and it OPENS arduino with the CODE below in TAB # 1.... and about 7+ more tabs open beside it (code for the additional options for this project)


it wont let me post the code here... over 9000 characters... it wont let me attach the RAR file.... 9 MB

this is the link to the RAR
https://www.youtube.com/redirect?q=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D1mHazgA3IgxVpmz_T7RL1ijHrEege9Vjk&event=video_description&redir_token=k5FHEbtpj8Kxe-uSQAIxGHl2asF8MTU1MzQ0NzU5MEAxNTUzMzYxMTkw&v=Ct2aSvVlego

Its the one that says: (in the folder)... push_button_line_in

And it has the libraries included...

/////////////ERROR INFO///////////
Arduino: 1.6.5 (Windows 8.1), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

pushbuttonlinein.ino:2:35: fatal error: Adafruit_NeoPixel.h: No such file or directory
compilation terminated.
Error compiling.

 This report would have more information with
 "Show verbose output during compilation"
 enabled in File > Preferences.

** My directory TREE is above in a previous mssg in this thread...... only 4 or 5 mssgs above...

thanks !

Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: cattledog on Mar 23, 2019, 06:16 pm
Quote
The place I got the files from already had the library files... and I put there where the author said to...
Did you put the library files where @pert told you to put them?

Quote
Libraries must be installed to the libraries subfolder of your sketchbook folder. In your case, that is C:\Users\Administrator\Documents\Arduino\libraries.
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: Transam98 on Mar 23, 2019, 06:26 pm
yep, I believe Ive done all correctly :) here is a screen shot showing directory layout and error etc :)

Am I missing anything or anything else I need to check ?

as from the screenshot... it says this is missing: Adafruit_NeoPixel.h

im not sure where that is supposed to come from (a library maybe ?) as it isnt in his libraries he included with the project :)
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: cattledog on Mar 23, 2019, 06:49 pm
Quote
here is a screen shot showing directory layout
(http://forum.arduino.cc/index.php?action=dlattach;topic=605291.0;attach=300675)

Your file layout does not look correct.

At the level of Documents>Arduino there should be sketches in folders and a folder called libraries.

In that library folder there should be Adafruit NeoPixel and FastLed. You can install them through the library manager of the ide.

Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: Transam98 on Mar 23, 2019, 06:58 pm
thanks on the reply !
ughhhh how annoying....

So I went to sketch->include library->manage
and typed in the search bar... FAST LED and NEOPIXEL,,,,,

Added/installed both :)
restarted arduino software...
loaded file (rt click edit arduino (main file called pushbuttonlinein.ino)
it opens, pressed right arrow... got this error...


Arduino: 1.6.5 (Windows 8.1), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from pushbuttonlinein.ino:3:0:
C:\Users\Administrator\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.006
 #    pragma message "FastLED version 3.002.006"
                     ^
pushbuttonlinein:1748: error: invalid conversion from 'void (*)(boolean) {aka void (*)(bool)}' to 'void (*)()' [-fpermissive]
pushbuttonlinein:1748: error: invalid conversion from 'void (*)(uint8_t) {aka void (*)(unsigned char)}' to 'void (*)()' [-fpermissive]
invalid conversion from 'void (*)(boolean) {aka void (*)(bool)}' to 'void (*)()' [-fpermissive]

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: cattledog on Mar 23, 2019, 07:12 pm
Quote
In file included from pushbuttonlinein.ino:3:0:
C:\Users\Administrator\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.006
 #    pragma message "FastLED version 3.002.006"
                     ^
I do not think this is a problem as I see this in the library
Code: [Select]
#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
#define FASTLED_HAS_PRAGMA_MESSAGE
#endif

#define FASTLED_VERSION 3002006
#ifndef FASTLED_INTERNAL
#  ifdef FASTLED_HAS_PRAGMA_MESSAGE
#    pragma message "FastLED version 3.002.006"
#  else
#    warning FastLED version 3.002.006  (Not really a warning, just telling you here.)
#  endif
#endif


You can certainly try to run some of the Fast Led library examples to verify that all is OK.

Quote
pushbuttonlinein:1748: error: invalid conversion from 'void (*)(boolean) {aka void (*)(bool)}' to 'void (*)()' [-fpermissive]
pushbuttonlinein:1748: error: invalid conversion from 'void (*)(uint8_t) {aka void (*)(unsigned char)}' to 'void (*)()' [-fpermissive]
invalid conversion from 'void (*)(boolean) {aka void (*)(bool)}' to 'void (*)()' [-fpermissive]
You will have to post the code at line 1748.

Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: Transam98 on Mar 23, 2019, 07:17 pm
unfortunately im a newbie and have no clue ;( 1st time ive ever owned a arduino ;(

I figured it would be straightforward install arduino s/w
load code program arduino and bootup and wire up hardware :) (lol)

Ive flashed stuff before, programmed microcontrollers/eproms etc
but have no idea why this isnt more straightforward ;(

Watched the youtube video of this project, got the code did the wiring of the circuit etc... but have failed on getting code into arduino ;(
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: pert on Mar 23, 2019, 08:00 pm
You are using a very old version of the Arduino IDE. Since the Arduino AVR Boards hardware package used by the Arduino Mega is bundled with the Arduino IDE, you are also using a very outdated version of Arduino AVR Boards. In more recent versions of Arduino AVR Boards, Arduino updated to a new compiler version. That compiler update caused some bad code that compiled with the old compiler to no longer compile. In order to provide backwards compatibility, Arduino added the -fpermissive compiler flag, which caused the old bad code to continue to compile. As a side effect of -fpermissive, it allowed even more bad code to compile than ever before. The pushbuttonlinein sketch you found contains some of this bad code, and thus will only compile if you are using a modern version of Arduino AVR Boards. Although it is probably possible for you to just update Arduino AVR Boards via Boards Manager, I would recommend that you go ahead and update your Arduino IDE instead, unless you actually have a good reason for sticking with Arduino IDE 1.6.5.

You can download the Arduino IDE here:
http://www.arduino.cc/en/Main/Software (http://www.arduino.cc/en/Main/Software)
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: Transam98 on Mar 23, 2019, 11:58 pm
@pert... thanks on the reply/follow up :) and the explanation (which I mostly understand) lol....

The writer of the code ORIGINALLY had to use only 1.6.5....  so thats what I did (Your reason posted makes sense!)

Anyways i FINALLY got a hold of the one who coded it etc,... he did give me some new instructions etc and new files etc.... so im going to try what he said... part of what he said was what you said to change from 1.6.5 to newer as I guess his newer code also has taken care of the problem you explained ! Ill update you once I try his newer code/version of arduino ide.... etc and follow up here :) I DO APPRECIATE YOUR HELP !!! :)
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: pert on Mar 24, 2019, 03:38 am
Arduino AVR Boards is a package of software that allows the Arduino IDE to program the Arduino boards of the AVR architecture, such as Uno, Mega, Leonardo. There are also other packages you can install to add support for other architectures, such as the SAMD architecture used by the Arduino Zero and MKR boards.

Because the Arduino IDE comes with a bundled version of Arduino AVR Boards, we're used to associating a particular version of Arduino AVR Boards with each version of the Arduino IDE. However, the Boards Manager feature now allows us to use any version of Arduino AVR Boards with any version of the Arduino IDE. The author of the code may have been using the old IDE version with a new Arduino AVR Boards version. You could do the same if you wanted. The reason I recommended updating the IDE is because there have been some isolated issues where a particular Arduino AVR Boards version had issues with some older IDE versions. I have no idea whether Arduino AVR Boards 1.6.23 will have problems with Arduino IDE 1.6.5. What I do know is that Arduino IDE 1.8.9 works fine with Arduino AVR Boards 1.6.23. So it seemed like the safest advice. However, you could likely continue to use Arduino IDE 1.6.5 if you prefer.
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: Transam98 on Mar 24, 2019, 06:01 am
Thanks on the help so far !!!

The author if the project.... told me to goto version 1.8.9, he gave me a copy of the LIBRARIES and his sketches (as its called I guess...) he had me change a few things tools-boad-board manager- and choose version 1.6.20 etc etc....

so maybe my LAST ?.

this project I guess main file is called 'pushbuttonlinein' and UNDER that it has a lot of other *.ino files like "color","drip","fire" etc....

so I LOAD pushbuttonlinein and when I do that Ill see TABS open up next to it of "color""Drip""Fire" etc....

do I need to UPLOAD EACH tab individually ? or just the "main" one ?

thanks in advance :)
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: pert on Mar 24, 2019, 06:04 am
do I need to UPLOAD EACH tab individually ? or just the "main" one ?
Just the main one. That will upload everything. The multiple tabs are all part of a single program, it's just split into multiple files to make it easier to work with.
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: Transam98 on Mar 24, 2019, 06:16 am
Gotchya, Ok I DID upload each individually.... (me jumping ahead ahha)....

So should I PRESS the RED RESET Button, then reboot the arduino(mega 2560) (aka unplug usb then plug back in) and upload just the 1 file ?

thanks ! you have been a great help and im very grateful ! :)
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: pert on Mar 24, 2019, 06:50 am
Ok I DID upload each individually
All that did was upload the same program to your Arduino over and over again. It makes absolutely no difference which tab you have selected when you press the Upload button. It uploads the whole sketch. Every time you upload, it erases the previous program that was on the Arduino, so it wouldn't even make sense to upload multiple separate sketches consecutively.

So should I PRESS the RED RESET Button, then reboot the arduino(mega 2560) (aka unplug usb then plug back in) and upload just the 1 file ?
No. That wouldn't do anything different. Pressing reset or unplugging and plugging back in the Arduino board only restarts the program that you uploaded to it. It doesn't do anything magic other than that. You uploaded the program. Everything is fine.

thanks ! you have been a great help and im very grateful ! :)
You're welcome. I'm glad if I was able to be of assistance.
Title: Re: Newbie Help...No such file or directory. Compilation terminated.
Post by: Transam98 on Mar 24, 2019, 06:54 am
LOL Gotchya :) I guess in essence I uploaded it 10X+ times it had better work hahahahaha :)

well I have the circuit all done I just have to connect everything together (probably sunday) wish me luck ! Ill let ya know a update once I power it on all etc :) thanks again !!