i'm using Dev-cpp. i tried my best to find out the reason but could not so please help me out

Switch to Codeblocks even though I love the Dev-C++ interface, the Mingw for it is far outdated.

Also you need to post more detail and probably the function because we cannot guess what you need help with/what the problem may be.

9 times out of 10, a linker error means you failed to define something that was declared before it's usage. Very often this is due to a static class data member:

class foo
{
    static int bar;
};

int foo::bar; // This external definition is required somewhere (ideally in a separate implementation file)!

That's one thing to look for.

@triumphost try Orwell's Dev-C++, that guy picked it up after all those years.
And YES, the compiler is more-or-less up to date.