LineArray.h No such file or directory


#1

Hi, I am using Mblock 3.4.11 and an Me Line Following Array, with the sugested Me_Line_Array_v2 extension.

When I try to compile and upload to an Mcore (Mbot) I get the message “LineArray.h: No such file or directory” and compile fails.So it seems the LineArray library is missing.

I can succesfully use Arduino IDE and the Sample Program for the Me Line Following Array, so the Me Line Following Array works.

I have reinstalled Mblock and all extensions to rule out something wrong in my computer setup, and I still get the same message.

I have also tried on a laptop and I got the same results.

How can I add the LineArray library?


#2

Hmm, this is an educated guess, but it likely has to do with where the libraries are installed for the sketchbook. mBlock 3.4.11 ships with Arduino 1.6.5 (the current version is 1.8.5 btw) and houses its sketchbook directory in the portable directory under the Java directory. On macOS the directory path is /Applications/mBlock_v3.4.11.app/Contents/Resources/Arduino/Arduino.app/Contents/Java/portable but I’m not sure right off where that would be under Windows (likely under the directory where mBlock gets installed). Make sure that you have the LineArray.h and LineArray.cpp file installed there. I’m not sure why the extension wouldn’t do that properly but that might be the root cause of the problem.

Be aware that mBlock uses the Arduino environment it ships with, not any other Arduino environment you may have installed.

In any case, I hope this helps.


#3

Hi Chuck, long time reader of your posts, first time responder :slight_smile:
I was expecting you would chime in :wink:

After reading another post https://forum.makeblock.com/t/line-follower-array-not-supported-in-scratch/5689/29 I am sure the problem is on the arduino compile server that does not have this extension for version 3.4.11.

I have just downloaded version 3.4.2 beta for Win XP, on a win7 machine and I can get it to compile correctly (wierd)


#4

Hi Giannos,

Glad to hear that someone is reading my posts. :wink:

Hmm, okay, so something is rotten in mBlock 3.4.11. I know there were some compile issues with 3.4.10 (I think) but if I recall correctly that was a code generation problem. However, the Arduino compiler is a variant of the GCC compiler modified to work with the AVR chipsets (essentially different standard libraries and compiles to the target processor). If the compiler is reporting that the LineArray.h file is not found, the root cause is that the file is not being found where the compiler expects it to be (which is usually with the .CPP file for Arduino sketches). I’ve got the extension installed and in the extension itself (MeLineArrayV2.s2e) I can see the include file LineArray.h mentioned, but I’m not sure where the extension is looking for it although I suspect it would be in the libraries directory of the sketchbook used by the mBlock app.

The only other thing I can think of would be to download the source files and put a copy in the folder with the rest of the Makeblock source files.

@tech_support, can you assist?


#5

I have downloaded the source files (they are a single zip file actualy that you can select and have the Mblock install it whereever it wants) and I have extracted and copy-pasted in every location I could think of, with no avail, as I expected, since the extension files are in javascript.

I got my old Win7 fully working with 3.4.2 now and I am transfering my PID line follow how to there (I even caught a bug).

Hope tech can shed some light on this


#6

Weird, did your zip file have the LineArray.cpp/LineArray.h files in it under the src directory? When I checked where the extension was installed, I only saw the .s2e file and the js directory. Somehow the Arduino source does not appear to be getting installed anywhere which is why the compiler can’t find it.


#7

Correct, just the .s2e file and the js directory. And the possible answer is that the .cpp and .h files are not installed by the extension manager (or somehow they were not included by the developer)


#8

I see the files in the zip file (see attached) but I’m not seeing them in the libraries folder of the sketchbook. The file listing is:

Me_Line_Array_v1.5.zip (3.7 KB)

Update: The 1.5 version of the Me Line Follower Array has the LineArray.h/LineArray.cpp files (the zip file I posted). The 2.0 version does not have those files. Any bets that is the problem? :wink:

Regards,

Chuck


#9

OHHHHH, you might have just caught it!

On my Win7 machine I got tired and let it install v1.5 through the extension manager first and when I saw it was working I manually installed v2.0.


#10

Well, ya know, sometimes I get lucky! :wink: