user15686: Consider:

I having a problem in compiling in extern "C" code in the Arduino IDE 1.6.7 which I don't have on version 1.6.5.
The error is:

error: conflicts with new declaration with 'C' linkage

It is complaining about the lines containing loop() and start_timer(void);.
This is my code:
#ifdef __cplusplus
extern "C" {
#endif

void start_timer(void);

#ifdef __cplusplus
}
#endif


void start_timer(void)
{
    Serial.println("2");
    Serial.begin(9600);
    delay(2000);
}


void setup()
{
    start_timer();
    Serial.println("4");
}


void loop()
{
    Serial.println("1");
    delay(2000);
}


user13432: The compiler is telling you that there is a conflict between the two definitions of start_timer(). 
The normal usage of extern "C" is in a header file for functions that are accessed from both C and C++. This actually has to do with how C++ handles names and overloading. Using extern "C" will use normal C name handling and C++ name mangling is turned off (together with overloading, etc). 
Please see https://stackoverflow.com/questions/31349865/compiler-error-for-conflicting-variable-declarations-conflicts-with-new-declar.

user10794: I can't reproduce your problem still. See this:


However if you are having problems (and frankly I expected you to) then you should read this:
How to avoid the quirks of the IDE sketch file pre-preprocessing
How the IDE organizes things

I can reproduce your problem in IDE 1.6.5 (not 1.6.7). The code generated by the IDE preprocessor is this:
#line 1 "sketch_jan11a.ino"
#ifdef __cplusplus
#include "Arduino.h"
void start_timer(void);
void setup();
void loop();
#line 2
extern "C" {
#endif

void start_timer(void);

#ifdef __cplusplus
}
#endif


void start_timer(void)
{
    Serial.println("2");
    Serial.begin(9600);
    delay(2000);
}


void setup()
{
    start_timer();
    Serial.println("4");
}

void loop()
{
    Serial.println("1");
    delay(2000);
}

You can see that in the automatic function prototype generation that the IDE "helpfully" generates for you, it puts the prototype for start_timer outside the extern "C" declaration. Thus one function prototype has a declaration in C++ format, and the other in C format.
Why are you even doing this? I presume this is a small example of a larger problem. 
If you follow the suggestions in my link How to avoid the quirks of the IDE sketch file pre-preprocessing - did you read that? - the problem goes away, because .cpp files in IDE tabs are not subjected to this extra processing.

15686: <p>Consider:</p>

<p><a href="https://i.stack.imgur.com/UNzrv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UNzrv.png" alt="Enter image description here"></a></p>

<p>I having a problem in compiling in extern "C" code in the Arduino IDE 1.6.7 which I don't have on version 1.6.5.</p>

<p>The error is:</p>

<blockquote>
  <p>error: conflicts with new declaration with 'C' linkage</p>
</blockquote>

<p>It is complaining about the lines containing <code>loop()</code> and <code>start_timer(void);</code>.</p>

<p>This is my code:</p>

<pre><code>#ifdef __cplusplus
extern "C" {
#endif

void start_timer(void);

#ifdef __cplusplus
}
#endif


void start_timer(void)
{
    Serial.println("2");
    Serial.begin(9600);
    delay(2000);
}


void setup()
{
    start_timer();
    Serial.println("4");
}


void loop()
{
    Serial.println("1");
    delay(2000);
}
</code></pre>
 13432: <p>The compiler is telling you that there is a conflict between the <em>two</em> definitions of start_timer(). </p>

<p>The normal usage of extern "C" is in a header file for functions that are accessed from both C and C++. This actually has to do with how C++ handles names and overloading. Using extern "C" will use normal C name handling and C++ name mangling is turned off (together with overloading, etc). </p>

<p>Please see <a href="https://stackoverflow.com/questions/31349865/compiler-error-for-conflicting-variable-declarations-conflicts-with-new-declar">https://stackoverflow.com/questions/31349865/compiler-error-for-conflicting-variable-declarations-conflicts-with-new-declar</a>.</p>
 10794: <p>I can't reproduce your problem still. See this:</p>

<p><a href="https://i.stack.imgur.com/noxJR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/noxJR.png" alt="Compiler output"></a></p>

<hr>

<p>However if you are having problems (and frankly I expected you to) then you should read this:</p>

<p><a href="http://www.gammon.com.au/forum/?id=12625" rel="nofollow noreferrer">How to avoid the quirks of the IDE sketch file pre-preprocessing</a></p>

<p><a href="https://arduino.stackexchange.com/questions/13178/classes-and-objects-how-many-and-which-file-types-i-actually-need-to-use-them">How the IDE organizes things</a></p>

<hr>

<p>I can reproduce your problem in IDE 1.6.5 (not 1.6.7). The code generated by the IDE preprocessor is this:</p>

<pre><code>#line 1 "sketch_jan11a.ino"
#ifdef __cplusplus
#include "Arduino.h"
void start_timer(void);
void setup();
void loop();
#line 2
extern "C" {
#endif

void start_timer(void);

#ifdef __cplusplus
}
#endif


void start_timer(void)
{
    Serial.println("2");
    Serial.begin(9600);
    delay(2000);
}


void setup()
{
    start_timer();
    Serial.println("4");
}

void loop()
{
    Serial.println("1");
    delay(2000);
}
</code></pre>

<p>You can see that in the automatic function prototype generation that the IDE "helpfully" generates for you, it puts the prototype for <code>start_timer</code> outside the extern "C" declaration. Thus one function prototype has a declaration in C++ format, and the other in C format.</p>

<p>Why are you even doing this? I presume this is a small example of a larger problem. </p>

<p>If you follow the suggestions in my link <a href="http://www.gammon.com.au/forum/?id=12625" rel="nofollow noreferrer">How to avoid the quirks of the IDE sketch file pre-preprocessing</a> - <em>did you read that?</em> - the problem goes away, because .cpp files in IDE tabs are not subjected to this extra processing.</p>
