Message-Id: <199808291550.RAA24908@ieva06.lanet.lv> From: "Andris Pavenis" To: djgpp AT delorie DOT com, nonex AT hotmail DOT com Date: Sat, 29 Aug 1998 17:54:25 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Undefined reference... In-reply-to: <35e828da.3904793@news.piro.net> Precedence: bulk From: nospam AT 127 DOT 0 DOT 0 DOT 1 (Xenon) Subject: Undefined reference... > > #include > #include <_String.h> > > void main(void) { > String test(" Teststring "); > printf("|%s|\n",test); > } I think that the message from gcc is clear enough: C:\D\OUTPUT>gcc -g3 -O3 xx.cc -lgpp -lstdcxx -o xx xx.cc: In function `int main(...)': xx.cc:6: warning: cannot pass objects of type `String' through `...' That means that You should add explicit cast to 'const char *' as object of class String cannot be used as parameter to printf: printf("|%s|",(const char *) test); After that the example works (One hint: if you get unresolved references without optimizations try -O)