From b0babedcb7a9f4c737540d8ac7007b12ff5d979b Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 13 Nov 2002 16:25:17 +0000 Subject: [PATCH] fix linking problem with boost git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5629 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/ChangeLog | 4 ++++ src/support/lyxsum.C | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/src/support/ChangeLog b/src/support/ChangeLog index 5407d3ef45..d376e2589c 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,7 @@ +2002-11-13 Jean-Marc Lasgouttes + + * lyxsum.C: an ugly hack to compile with non-gnu linkers + 2002-11-12 Angus Leeming * lstrings.C (getVectorFromString): #if 0 -> #if 1 until Lars devises diff --git a/src/support/lyxsum.C b/src/support/lyxsum.C index 55763b28f3..f7e89fa200 100644 --- a/src/support/lyxsum.C +++ b/src/support/lyxsum.C @@ -18,6 +18,15 @@ using std::endl; +// OK, this is ugly, but it is the only workaround I found to compile +// with gcc (any version) on a system which uses a non-GNU toolchain. +// The problem is that gcc uses a weak symbol for a particular +// instantiation and that the system linker usually does not +// understand those weak symbols (seen on HP-UX, tru64, AIX and +// others). Thus we force an explicit instanciation of this particular +// template (JMarc) +template class boost::detail::crc_table_t<32, 0x04C11DB7, true>; + // Various implementations of lyx::sum(), depending on what methods // are available. Order is faster to slowest. #if defined(HAVE_MMAP) && defined(HAVE_MUNMAP)