C++ LNK 2019 from different project but in the same solution
<p>C++ solution..
I'm trying to create an project to call another project, so it is supposed to allow me to call the header file from the other project but once i called, there will be the lnk error 2019.</p>

<p>I couldnt understand why it is so.</p>

<p>Initially i thought it was compiler's problem. but slowly i realised, the project cannot be interlinked. any solution out there to assist me in overcoming the problem. </p>

<p>Appreciated the help alot. but it's urgent..</p>

<p>Example :</p>

<p>Created a date proj(which contain datetime.h link with date.h and time.h WORKS FINE)
created a power proj - to store float variable only.
Created a input proj to store date and power from the two projects above..
but once i declare a Input input; it has the linker problem</p>

<p>Source code as below..
<strong><em>Input.h</em></strong></p>

<pre><code>#ifndef INPUT_H
#define INPUT_H
//#include "../Date/DateTime.h"
#include "../Power/Power.h"

class Input{
public:
    Input();
    //{
        /*DateTime datetime;
        SetDateTime(datetime);*/
    //}

    friend ostream&amp; operator &lt;&lt; (ostream &amp;output, const Input &amp;value);
    friend istream &amp; operator&gt;&gt;( istream &amp;input, Input &amp;value );
    void SetPower(Power power){
        mpower = power;
    }
    Power GetPower(){
        return mpower;
    }
    //get and set method of variable DateTime
    /*void SetDateTime(DateTime datetime);
    DateTime GetDateTime();*/
private:
    string test;
    Power mpower;
    //DateTime m_datetime;
};

#endif
</code></pre>

<p><em><strong>input.cpp file</em></strong></p>

<pre><code>ostream&amp; operator &lt;&lt; (ostream &amp;output, const Input &amp;value){
    output&lt;&lt;"test";
    //&lt;&lt;value.test;
    //output&lt;&lt;value.m_datetime&lt;&lt;endl;
    return output;
}
istream &amp; operator&gt;&gt;( istream &amp;input, Input &amp;value ){
    //input&gt;&gt;value.m_datetime;
    return input;
}
</code></pre>
