Hi all,
when compiling with --enable-shared (that would seem a good
switch to enable at a first glance), linking fails due to a double
inclusion of Dialog.o. Details follow (version from SVN).
T.
$ ./configure --disable-debug --disable-stdlib-debug
--enable-optimization=-O --disable-pch --enable-shared
[...]
$ make
[...]
g++ -shared -nostdlib
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crti.o
/usr/lib/gcc/i486-linux-gnu/4.1.2/crtbeginS.o .libs/Dialog.o
.libs/Dialog.o .libs/Kernel.o .libs/ButtonPolicy.o .libs/ControlBibtex.o
.libs/ControlBox.o .libs/ControlBranch.o .libs/ControlCharacter.o
.libs/ControlChanges.o .libs/ControlCitation.o .libs/ControlCommand.o
.libs/ControlCommandBuffer.o .libs/ControlDocument.o
.libs/ControlEmbeddedFiles.o .libs/ControlErrorList.o .libs/ControlERT.o
.libs/ControlExternal.o .libs/ControlFloat.o .libs/ControlGraphics.o
.libs/ControlInclude.o .libs/ControlListings.o .libs/ControlLog.o
.libs/ControlViewSource.o .libs/ControlMath.o .libs/ControlNote.o
.libs/ControlParagraph.o .libs/ControlPrefs.o .libs/ControlPrint.o
.libs/ControlRef.o .libs/ControlSearch.o .libs/ControlSendto.o
.libs/ControlShowFile.o .libs/ControlSpellchecker.o
.libs/ControlTabular.o .libs/ControlTabularCreate.o
.libs/ControlTexinfo.o .libs/ControlThesaurus.o .libs/ControlToc.o
.libs/ControlVSpace.o .libs/ControlWrap.o .libs/frontend_helpers.o
-L/usr/lib/gcc/i486-linux-gnu/4.1.2
-L/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -lstdc++ -lm -lc -lgcc_s
/usr/lib/gcc/i486-linux-gnu/4.1.2/crtendS.o
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crtn.o -Wl,-soname
-Wl,liblyxcontrollers.so.0 -o .libs/liblyxcontrollers.so.0.0.0
.libs/Dialog.o: In function `lyx::frontend::Dialog::setButtonsValid(bool)':
Dialog.cpp:(.text+0x0): multiple definition of
`lyx::frontend::Dialog::setButtonsValid(bool)'
.libs/Dialog.o:Dialog.cpp:(.text+0x0): first defined here
.libs/Dialog.o: In function `lyx::frontend::Dialog::checkStatus()':
Dialog.cpp:(.text+0x6): multiple definition of
`lyx::frontend::Dialog::checkStatus()'
.libs/Dialog.o:Dialog.cpp:(.text+0x6): first defined here
.libs/Dialog.o: In function `lyx::frontend::Dialog::isVisible() const':
Dialog.cpp:(.text+0xc): multiple definition of
`lyx::frontend::Dialog::isVisible() const'
.libs/Dialog.o:Dialog.cpp:(.text+0xc): first defined here
.libs/Dialog.o: In function `lyx::frontend::Dialog::redraw()':
Dialog.cpp:(.text+0x22): multiple definition of
`lyx::frontend::Dialog::redraw()'
.libs/Dialog.o:Dialog.cpp:(.text+0x22): first defined here
.libs/Dialog.o: In function
`lyx::frontend::Dialog::Controller::Controller(lyx::frontend::Dialog&)':
Dialog.cpp:(.text+0x36): multiple definition of
`lyx::frontend::Dialog::Controller::Controller(lyx::frontend::Dialog&)'
.libs/Dialog.o:Dialog.cpp:(.text+0x36): first defined here
.libs/Dialog.o: In function `lyx::frontend::Dialog::getViewTitle() const':
Dialog.cpp:(.text+0x5a): multiple definition of
`lyx::frontend::Dialog::getViewTitle() const'
.libs/Dialog.o:Dialog.cpp:(.text+0x5a): first defined here
.libs/Dialog.o: In function
`lyx::frontend::Dialog::setViewTitle(std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)':
Dialog.cpp:(.text+0xf8): multiple definition of
`lyx::frontend::Dialog::setViewTitle(std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)'
.libs/Dialog.o:Dialog.cpp:(.text+0xf8): first defined here
.libs/Dialog.o: In function
`lyx::frontend::Dialog::update(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)':
Dialog.cpp:(.text+0x126): multiple definition of
`lyx::frontend::Dialog::update(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
.libs/Dialog.o:Dialog.cpp:(.text+0x126): first defined here
.libs/Dialog.o: In function `lyx::frontend::Dialog::hide()':
Dialog.cpp:(.text+0x1e6): multiple definition of
`lyx::frontend::Dialog::hide()'
.libs/Dialog.o:Dialog.cpp:(.text+0x1e6): first defined here
.libs/Dialog.o: In function `lyx::frontend::Dialog::controller() const':
Dialog.cpp:(.text+0x240): multiple definition of
`lyx::frontend::Dialog::controller() const'
.libs/Dialog.o:Dialog.cpp:(.text+0x240): first defined here
.libs/Dialog.o: In function
`lyx::frontend::Dialog::Controller::Controller(lyx::frontend::Dialog&)':
Dialog.cpp:(.text+0x29a): multiple definition of
`lyx::frontend::Dialog::Controller::Controller(lyx::frontend::Dialog&)'
.libs/Dialog.o:Dialog.cpp:(.text+0x29a): first defined here
.libs/Dialog.o: In function
`lyx::frontend::Dialog::show(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)':
Dialog.cpp:(.text+0x2be): multiple definition of
`lyx::frontend::Dialog::show(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
.libs/Dialog.o:Dialog.cpp:(.text+0x2be): first defined here
.libs/Dialog.o: In function
`lyx::frontend::Dialog::setController(lyx::frontend::Dialog::Controller*)':
Dialog.cpp:(.text+0x37a): multiple definition of
`lyx::frontend::Dialog::setController(lyx::frontend::Dialog::Controller*)'
.libs/Dialog.o:Dialog.cpp:(.text+0x37a): first defined here
.libs/Dialog.o: In function
`lyx::frontend::Dialog::Controller::canApply() const':
Dialog.cpp:(.text+0x456): multiple definition of
`lyx::frontend::Dialog::Controller::canApply() const'
.libs/Dialog.o:Dialog.cpp:(.text+0x456): first defined here
.libs/Dialog.o: In function `lyx::frontend::Dialog::apply()':
Dialog.cpp:(.text+0x5dc): multiple definition of
`lyx::frontend::Dialog::apply()'
.libs/Dialog.o:Dialog.cpp:(.text+0x5dc): first defined here
.libs/Dialog.o: In function
`lyx::frontend::Dialog::Dialog(lyx::frontend::LyXView&,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&)':
Dialog.cpp:(.text+0x76a): multiple definition of
`lyx::frontend::Dialog::Dialog(lyx::frontend::LyXView&,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&)'
.libs/Dialog.o:Dialog.cpp:(.text+0x76a): first defined here
.libs/Dialog.o: In function `lyx::frontend::Dialog::~Dialog()':
Dialog.cpp:(.text+0x7d4): multiple definition of
`lyx::frontend::Dialog::~Dialog()'
.libs/Dialog.o:Dialog.cpp:(.text+0x7d4): first defined here
.libs/Dialog.o: In function
`lyx::frontend::Dialog::Dialog(lyx::frontend::LyXView&,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&)':
Dialog.cpp:(.text+0x8f4): multiple definition of
`lyx::frontend::Dialog::Dialog(lyx::frontend::LyXView&,
std::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&)'
.libs/Dialog.o:Dialog.cpp:(.text+0x8f4): first defined here
.libs/Dialog.o: In function `lyx::frontend::Dialog::~Dialog()':
Dialog.cpp:(.text+0x95e): multiple definition of
`lyx::frontend::Dialog::~Dialog()'
.libs/Dialog.o:Dialog.cpp:(.text+0x95e): first defined here
.libs/Dialog.o: In function `lyx::frontend::Dialog::~Dialog()':
Dialog.cpp:(.text+0xa82): multiple definition of
`lyx::frontend::Dialog::~Dialog()'
.libs/Dialog.o:Dialog.cpp:(.text+0xa82): first defined here
collect2: ld returned 1 exit status
make[6]: *** [liblyxcontrollers.la] Error 1
make[6]: Leaving directory
`/home/tommaso/lyx-devel-svn/src/frontends/controllers'
make[5]: *** [all] Error 2
make[5]: Leaving directory
`/home/tommaso/lyx-devel-svn/src/frontends/controllers'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/tommaso/lyx-devel-svn/src/frontends'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/tommaso/lyx-devel-svn/src/frontends'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tommaso/lyx-devel-svn/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/tommaso/lyx-devel-svn/src'
make: *** [all-recursive] Error 1
--
Tommaso Cucinotta, Computer Engineering PhD, Researcher
ReTiS Lab, Scuola Superiore Sant'Anna, Pisa, Italy
Tel +39 050 882 024, Fax +39 050 882 003
http://feanor.sssup.it/~tommaso