user29519: I was using a 3rd party programming enviroment, mBlock 3.4.5 for making C++ Arduino programmes with a graphical programming language. I was compiling a program and the following eroor came up.
project_Untitled0_0.ino:65:1: error: 'MeDCMotor' does not name a type
project_Untitled0_0.ino:66:1: error: 'MeDCMotor' does not name a type
project_Untitled0_0.ino: In function 'void move(int, int)':
project_Untitled0_0.ino:85:7: error: 'motor_9' was not declared in this scope
project_Untitled0_0.ino:85:24: error: 'M1' was not declared in this scope
project_Untitled0_0.ino:86:7: error: 'motor_10' was not declared in this scope
'MeDCMotor' does not name a type

I took another look at the program and there were some lines of code that seem they are added in the program by deafult:
MeDCMotor motor_9(9);
MeDCMotor motor_10(10);
void move(int direction, int speed)
{
      int leftSpeed = 0;
      int rightSpeed = 0;
      if(direction == 1){
            leftSpeed = speed;
            rightSpeed = speed;
      }else if(direction == 2){
            leftSpeed = -speed;
            rightSpeed = -speed;
      }else if(direction == 3){
            leftSpeed = -speed;
            rightSpeed = speed;
      }else if(direction == 4){
            leftSpeed = speed;
            rightSpeed = -speed;
      }
      motor_9.run((9)==M1?-(leftSpeed):(leftSpeed));
      motor_10.run((10)==M1?-(rightSpeed):(rightSpeed));
}

Since the program does not recognise the MeDCMotor class the program failed to upload.
I am running Windows 10 home edition on a 64-bit laptop.
Is there a way to remove the lines of code that prevent me from uploading the sketch or are there other ways to solve it?

user3917: I looked at some entries in a google search for error: 'MeDCMotor' does not name a type, such as 1, 2, 3 and 4.  The first three of those latter four links directly address the question you ask, and none of them answer it clearly, except to suggest re-downloading or re-installing the makeblock library.  While the fourth link addresses a “does not name a type” error for another library, rather than for makeblock, it has a relatively clear explanation of the problem for that other library:

So, as supplied, the ArduinoByteBuffer.zip file had a complex set of sub-directories, and the two files ByteBuffer.ccp and ByteBuffer.h were located one level down in: \ArduinoByteBuffers\ByteBuffer\
When I 'installed' the library, it went into the directory:  

C:\Documents and Settings\Al\My Documents\Arduino\libraries\ArduinoByteBuffers\ByteBuffer\ByteBuffer.ccp
       C:\Documents and Settings\Al\My Documents\Arduino\libraries\ArduinoByteBuffers\ByteBuffer\ByteBuffer.h

To solve the problem I moved them up a level to:

C:\Documents and Settings\Al\My Documents\Arduino\libraries\ArduinoByteBuffers\ByteBuffer.ccp
       C:\Documents and Settings\Al\My Documents\Arduino\libraries\ArduinoByteBuffers\ByteBuffer.h

That seemed to be the key - moving the two files (*.ccp and *.h) out of the subdirectory.

Instead of following ordinary C or C++ library-finding rules, the Arduino IDE copies sets of files into a temporary directory according to its own rules when compiling a sketch.  You'll need to move your makeblock library files around to match up with Arduino IDE conventions.

user83101: In the MakeBlock, menu "choice of extensions", uncheck all the extensions, keeping only the one called "Makeblock" checked:


29519: <p>I was using a 3rd party programming enviroment, mBlock 3.4.5 for making C++ Arduino programmes with a graphical programming language. I was compiling a program and the following eroor came up.</p>

<pre><code>project_Untitled0_0.ino:65:1: error: 'MeDCMotor' does not name a type
project_Untitled0_0.ino:66:1: error: 'MeDCMotor' does not name a type
project_Untitled0_0.ino: In function 'void move(int, int)':
project_Untitled0_0.ino:85:7: error: 'motor_9' was not declared in this scope
project_Untitled0_0.ino:85:24: error: 'M1' was not declared in this scope
project_Untitled0_0.ino:86:7: error: 'motor_10' was not declared in this scope
'MeDCMotor' does not name a type
</code></pre>

<p>I took another look at the program and there were some lines of code that seem they are added in the program by deafult:</p>

<pre><code>MeDCMotor motor_9(9);
MeDCMotor motor_10(10);
void move(int direction, int speed)
{
      int leftSpeed = 0;
      int rightSpeed = 0;
      if(direction == 1){
            leftSpeed = speed;
            rightSpeed = speed;
      }else if(direction == 2){
            leftSpeed = -speed;
            rightSpeed = -speed;
      }else if(direction == 3){
            leftSpeed = -speed;
            rightSpeed = speed;
      }else if(direction == 4){
            leftSpeed = speed;
            rightSpeed = -speed;
      }
      motor_9.run((9)==M1?-(leftSpeed):(leftSpeed));
      motor_10.run((10)==M1?-(rightSpeed):(rightSpeed));
}
</code></pre>

<p>Since the program does not recognise the MeDCMotor class the program failed to upload.</p>

<p>I am running Windows 10 home edition on a 64-bit laptop.</p>

<p>Is there a way to remove the lines of code that prevent me from uploading the sketch or are there other ways to solve it?</p>
 3917: <p>I looked at some entries in a google search for <em><a href="https://www.google.com/search?num=50&amp;site=&amp;source=hp&amp;q=+error%3A+%27MeDCMotor%27+does+not+name+a+type&amp;oq=+error%3A+%27MeDCMotor%27+does+not+name+a+type&amp;gs_l=hp.3...1290.1290.0.3512.2.2.0.0.0.0.133.236.0j2.2.0....0...1..64.hp..0.0.0.0.Waru0ErKOcY" rel="nofollow noreferrer">error: 'MeDCMotor' does not name a type</a></em>, such as <a href="http://forum.arduino.cc/index.php?topic=224697.0" rel="nofollow noreferrer">1</a>, <a href="http://forum.makeblock.com/t/need-help-with-ir-control/402/1" rel="nofollow noreferrer">2</a>, <a href="http://blog.makeblock.com/getting-started-with-ardublock-for-makeblock-electronic-modules/" rel="nofollow noreferrer">3</a> and <a href="http://forum.arduino.cc/index.php?topic=155921.0" rel="nofollow noreferrer">4</a>.  The first three of those latter four links directly address the question you ask, and none of them answer it clearly, except to suggest re-downloading or re-installing the makeblock library.  While the fourth link addresses a “does not name a type” error for another library, rather than for makeblock, it has a relatively clear explanation of the problem for that other library:</p>

<blockquote>
  <p>So, as supplied, the ArduinoByteBuffer.zip file had a complex set of sub-directories, and the two files ByteBuffer.ccp and ByteBuffer.h were located one level down in: \ArduinoByteBuffers\ByteBuffer\</p>
  
  <p>When I 'installed' the library, it went into the directory:  </p>
  
  <blockquote>
    <p>C:\Documents and Settings\Al\My Documents\Arduino\libraries\ArduinoByteBuffers\ByteBuffer\ByteBuffer.ccp
       C:\Documents and Settings\Al\My Documents\Arduino\libraries\ArduinoByteBuffers\ByteBuffer\ByteBuffer.h</p>
  </blockquote>
  
  <p>To solve the problem I moved them up a level to:</p>
  
  <blockquote>
    <p>C:\Documents and Settings\Al\My Documents\Arduino\libraries\ArduinoByteBuffers\ByteBuffer.ccp
       C:\Documents and Settings\Al\My Documents\Arduino\libraries\ArduinoByteBuffers\ByteBuffer.h</p>
  </blockquote>
  
  <p>That seemed to be the key - moving the two files (*.ccp and *.h) out of the subdirectory.</p>
</blockquote>

<p>Instead of following ordinary C or C++ library-finding rules, the Arduino IDE copies sets of files into a temporary directory according to its own rules when compiling a sketch.  You'll need to move your makeblock library files around to match up with Arduino IDE conventions.</p>
 83101: <p>In the MakeBlock, menu &quot;choice of extensions&quot;, uncheck all the extensions, keeping only the one called &quot;Makeblock&quot; checked:</p>
<p><a href="https://i.stack.imgur.com/hpQ8r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hpQ8r.png" alt="enter image description here" /></a></p>
