Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Hello,
I'm trying to create a (GNU) makefile for gcc (GNUARM 4.0.1 build) to compile a C++ appliation using classes with virtual functions. When I generate a Makefile using the VS addin and port it to GNU make, it results in this error:

MyScreen.o:(.gnu.linkonce.r._ZTI16MyScreen[_ZTI16MyScreen]+0x0): undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info'

So from scouring the forums, I have seen mentioned the need to include some mix of the stdc++, gcc and c libs. If I add all three in the right order, it will compile, but not build to a mod file giving the error:

Unknown section name ".gcc_except_table]:"

Which would imply there are exceptions about, but my new/delete operators are overridden and I don't use any exceptions. I also notice that the generated file is huge at around 400k without debug symbols (probably because it's pulling in the whole c library, right?).

So, my question is, does anyone have a good recipe for getting this all working? Maybe a makefile, and suggestions on which distribution of gcc to use?

Thanks

-Al

Check this out:
http://brewforums.qualcomm.com/showthread.php?s=&threadid=2033
For exceptions, try -fno-exceptions

Check this out:
http://brewforums.qualcomm.com/showthread.php?s=&threadid=2033
For exceptions, try -fno-exceptions

Cool, that worked. I had -fno-exceptions but I think the pure virtual replacement was probably the key. It's also down to 7k. Our test device is out right now, but I will give it a try tomorrow.
thanks!

Cool, that worked. I had -fno-exceptions but I think the pure virtual replacement was probably the key. It's also down to 7k. Our test device is out right now, but I will give it a try tomorrow.
thanks!