From: Ataollah M. <am...@ti...> - 2012-09-04 01:45:39
|
On Sep 3, 2012, at 7:41 PM, Roy Stogner <roy...@ic...> wrote: > > On Mon, 3 Sep 2012, Ataollah Mesgarnejad wrote: > >> http://stackoverflow.com/questions/6112362/explicit-instantiation-of-a-templated-class-and-dynamic-cast-in-a-shared-library >> >> way over my head here but I think the second answer is the key. > > This is interesting. I think the discussion of the C++ standard is > wrong, though. C++ leaves shared library behavior "undefined" only in > the same way it doesn't define behavior on Intel processors or > behavior on Windows XP; some things (e.g. what happens when > dereferencing NULL or reading past the end of an array) are > implementation-dependent, but most of the standard is still supposed > to be followed. That includes dynamic_cast; nothing in 5.2.7 suggests > otherwise, and grepping through the other thousand pages of the > standards draft didn't come up with anything either. > > > But whatever. Do either of the compiler/linker flags here help? > > http://www.personal.psu.edu/stm134/Software.html > No, -Wl,-no_compact_linkedit is obsolete also -Wl,-E or -Wl,--export-dynamic is not recognized. Best, Ata > > Alternatively, try commenting out the HAVE_RTTI definition in > libmesh_config.h - do things then work? > --- > Roy |