user38069: I want to call chainActive.Tip()->nHeight in core.cpp. It is not possible, I am interested in every idea. 
https://github.com/LIMXTEC/BitSend/blob/DEV-joshafest/src/core.cpp
Here is an example :
bool GetH()
{   
    int nBlockHeight = chainActive.Tip()->nHeight;  
    if(nBlockHeight < FORKX17_Main_Net ) 
        return true;    
    else 
        return false; 
    }
}

uint256 CBlockHeader::GetHash() const 
{   
    if (GetH())     
    {
        return HashX11(BEGIN(nVersion), END(nNonce)); 
    }
    else    
    {
       return HashX17(BEGIN(nVersion), END(nNonce));    
    }
}

Also that is not possible:
CBlockIndex* pindexPrev = chainActive.Tip();
if (pindexPrev->nHeight <= FORKX17_Main_Net)



user13866: As SajithP commented:

modify the makefile to include the object of the class which has the chainActive as a member. e.g 'x.o' where chainActive is a member of class 'x' 


38069: <p>I want to call chainActive.Tip()->nHeight in core.cpp. It is not possible, I am interested in every idea. </p>

<p><a href="https://github.com/LIMXTEC/BitSend/blob/DEV-joshafest/src/core.cpp" rel="nofollow noreferrer">https://github.com/LIMXTEC/BitSend/blob/DEV-joshafest/src/core.cpp</a></p>

<p>Here is an example :</p>

<pre><code>bool GetH()
{   
    int nBlockHeight = chainActive.Tip()-&gt;nHeight;  
    if(nBlockHeight &lt; FORKX17_Main_Net ) 
        return true;    
    else 
        return false; 
    }
}

uint256 CBlockHeader::GetHash() const 
{   
    if (GetH())     
    {
        return HashX11(BEGIN(nVersion), END(nNonce)); 
    }
    else    
    {
       return HashX17(BEGIN(nVersion), END(nNonce));    
    }
}
</code></pre>

<p>Also that is not possible:</p>

<pre><code>CBlockIndex* pindexPrev = chainActive.Tip();
if (pindexPrev-&gt;nHeight &lt;= FORKX17_Main_Net)
</code></pre>

<p><a href="https://i.stack.imgur.com/EoH5U.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EoH5U.jpg" alt="enter image description here"></a></p>
 13866: <p>As SajithP commented:</p>

<blockquote>
  <p>modify the makefile to include the object of the class which has the chainActive as a member. e.g 'x.o' where chainActive is a member of class 'x' </p>
</blockquote>
