Hi All,

In file included from ../../incl/_Components/DbRes.h:7,
                 from DbRes.cc:1:
../../incl/_Components/IniReader.h:79:8: warning: extra tokens at end of #endif directive
/sbcimp/run/pd/gcc/3.4.2-32bit/lib/gcc/sparc-sun-solaris2.8/3.4.2/crt1.o(.text+0x5c): In function `.nope':
: undefined reference to `main'
/var/tmp//ccA4edOw.o(.text+0x84c): In function `DbRes::Lock::Lock(String const&, String const&)':
/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:65: undefined reference to `String::String(char const*)'
/var/tmp//ccA4edOw.o(.text+0x8c4):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:65: undefined reference to `String::~String()'
/var/tmp//ccA4edOw.o(.text+0x8e4):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:65: undefined reference to `String::~String()'
/var/tmp//ccA4edOw.o(.text+0x934):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:70: undefined reference to `String::String(char const*)'
/var/tmp//ccA4edOw.o(.text+0x9b4):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:70: undefined reference to `String::~String()'
/var/tmp//ccA4edOw.o(.text+0x9d4):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:70: undefined reference to `String::~String()'
/var/tmp//ccA4edOw.o(.text+0xb40):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:80: undefined reference to `String::~String()'
/var/tmp//ccA4edOw.o(.text+0xb60):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:80: undefined reference to `String::~String()'
/var/tmp//ccA4edOw.o(.text+0xd60): In function `DbRes::Lock::Lock(String const&, String const&)':
/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:65: undefined reference to `String::String(char const*)'
/var/tmp//ccA4edOw.o(.text+0xdd8):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:65: undefined reference to `String::~String()'
/var/tmp//ccA4edOw.o(.text+0xdf8):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:65: undefined reference to `String::~String()'
/var/tmp//ccA4edOw.o(.text+0xe48):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:70: undefined reference to `String::String(char const*)'
/var/tmp//ccA4edOw.o(.text+0xec8):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:70: undefined reference to `String::~String()'
/var/tmp//ccA4edOw.o(.text+0xee8):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:70: undefined reference to `String::~String()'
/var/tmp//ccA4edOw.o(.text+0x1054):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:80: undefined reference to `String::~String()'
/var/tmp//ccA4edOw.o(.text+0x1074):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:80: undefined reference to `String::~String()'
/var/tmp//ccA4edOw.o(.text+0x1360): In function `DbRes::DbRes(String const&, String const&, int)':

Guys i am getting this error..Any idea why i am getting these errors, plz help me out in this.

my guess is you're missing one of the std libs to be passed on command line to the linker.. one that contains definition for String class..

Actually this is the String class(i derived this class from ) defined by me only..and i included its '.h' in the respective file i.e DBRes.cc.

Then why i am getting this error.

In that case post your command line.. problem should be that you've not included String.o on command line while linking..
Do a complete rebuild (of String as well as DbRes) and post all commands you used.. also the compiler name would help..

This error "../../incl/_Components/IniReader.h:79:8: warning: extra tokens at end of #endif directive"
is simply because you're doing
#endif SOME_TAG
although as you would k now #endif doesn't take have any parameters, change it to
#endif

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.