ld returns 1 as exit: reference not defined
<p>I'm learning C++ and I can't find where is the error of this program:</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

class myclass
{
    int a;
public:
    myclass(int num) { a= num; }
    void set_a(int num) { a = num; }
    int get_a() { return a; }
};

int sqrT(myclass obj);

int sgrT(myclass obj)
{
    return obj.get_a() * obj.get_a();
}

int main()
{
    myclass obj1(2);

    cout &lt;&lt; sqrT(obj1) &lt;&lt; endl;

    return 0;
}
</code></pre>

<p>I get a reference not defined for sqrT(myclass).</p>

<p>Where is the error?</p>
