title: keep getting implicit declaration error
body: <p>I keep getting these errors when compiling. I modified the code that runs on an arduino to run on my raspberry pi.</p>
  
  <pre><code>test1.c: In function ‘loop’:
  test1.c:24:3: warning: implicit declaration of function ‘rotateDeg’ [-Wimplicit-function-declaration]
  test1.c:33:3: warning: implicit declaration of function ‘rotate’ [-Wimplicit-function-declaration]
  test1.c: At top level:
  test1.c:42:6: warning: conflicting types for ‘rotate’ [enabled by default]
  test1.c:33:3: note: previous implicit declaration of ‘rotate’ was here
  test1.c: In function ‘rotate’:
  test1.c:46:3: warning: implicit declaration of function ‘abs’ [-Wimplicit-function-declaration]
  test1.c: At top level:
  test1.c:61:6: warning: conflicting types for ‘rotateDeg’ [enabled by default]
  test1.c:24:3: note: previous implicit declaration of ‘rotateDeg’ was here
  /usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../arm-linux-gnueabihf/crt1.o: In function `_start':
  (.text+0x34): undefined reference to `main'
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>Here is my source code:</p>
  
  <pre><code>#include &lt;wiringPi.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;stdio.h&gt;
  
  #define DIR_PIN 0
  #define STEP_PIN 3
  
  void setup() { 
    pinMode(DIR_PIN, OUTPUT); 
    pinMode(STEP_PIN, OUTPUT); 
  } 
  
  void loop(){ 
  
    rotateDeg(360, 1); 
    delay(1000);   
    rotateDeg(-360, .1);  //reverse
    delay(1000); 
    rotate(1600, .5); 
    delay(1000); 
  
    rotate(-1600, .25); //reverse
    delay(1000); 
  }
  
  void rotate(int steps, float speed){ 
    //rotate a specific number of microsteps (8 microsteps per step) - (negitive for reverse movement)
    //speed is any number from .01 -&gt; 1 with 1 being fastest - Slower is stronger
    int dir = (steps &gt; 0)? HIGH:LOW;
    steps = abs(steps);
  
    digitalWrite(DIR_PIN,dir); 
  
    float usDelay = (1/speed) * 70;
  
    for(int i=0; i &lt; steps; i++){ 
      digitalWrite(STEP_PIN, HIGH); 
      delayMicroseconds(usDelay); 
  
      digitalWrite(STEP_PIN, LOW); 
      delayMicroseconds(usDelay); 
    } 
  } 
  
  void rotateDeg(float deg, float speed){ 
    //rotate a specific number of degrees (negitive for reverse movement)
    //speed is any number from .01 -&gt; 1 with 1 being fastest - Slower is stronger
    int dir = (deg &gt; 0)? HIGH:LOW;
    digitalWrite(DIR_PIN,dir); 
  
    int steps = abs(deg)*(1/0.225);
    float usDelay = (1/speed) * 70;
  
    for(int i=0; i &lt; steps; i++){ 
      digitalWrite(STEP_PIN, HIGH); 
      delayMicroseconds(usDelay); 
  
      digitalWrite(STEP_PIN, LOW); 
      delayMicroseconds(usDelay); 
    } 
  }
  </code></pre>