"Hansen" <[EMAIL PROTECTED]> writes:

> As far as I've understod, this happens when using g++ 
> for compiling and gcc for linking, but I'm using g++ in both cases.

It happens when correct libraries are not present on the link line.
One way to arrange for that is to link with 'gcc', anouther is to
link with 'g++ -nodefaultlibs'

> It seems as if I can remove the problem if I remove the 
> option -nodefaultlibs from my linker options, but I doesn't want to do that, 
> due to size constraints.

I think you don't understand how linking works, and that your
"size constaints" argument is bogus: if you have a successful link,
removing -nodefaultlibs from the link line should have almost
no effect on the final exe size.

> Is there anyhow I can keep the -nodefaultlibs and 
> get rid of the undefined reference to '__cxa_pure_virtual' ?

Sure: just add the libraries that you removed with '-nodefaultlibs'
back on to the command line :)

FYI, __cxa_pure_virtual is in libstdc++.{a,so}

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
Help-gplusplus mailing list
Help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to