Hello,
I'm using TiXmlText class (from TinyXML in C::B SDK) in my Code Snippets plugin but I've have problem with the linker creating auto-import errors. Using the TiXmlElement class for example does not create these errors.
A simple way to reproduce is to create new Code::Blocks plugin, include "<tinyxml/tinyxml.h>" and use the TiXmlText class somewhere.
The log:
mingw32-g++.exe -DBUILDING_PLUGIN -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DTIXML_USE_STL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -g -IC:\SVN\codeblocks\src\sdk -IC:\SVN\codeblocks\src\sdk\wxscintilla\include -IC:\wxWidgets-2.6.3\include -IC:\wxWidgets-2.6.3\lib\gcc_dll\mswu -IC:\MinGW\include -c TestPlugin.cpp -o obj\Debug\TestPlugin.o
mingw32-g++.exe -shared -Wl,--dll -LC:\SVN\codeblocks\src\devel -LC:\wxWidgets-2.6.3\lib\gcc_dll -LC:\MinGW\lib obj\Debug\TestPlugin.o -o .\TestPlugin.dll -lcodeblocks -lwxmsw26u
Info: resolving vtable for TiXmlTextby linking to __imp___ZTV9TiXmlText (auto-import)
obj\Debug\TestPlugin.o(.text$_ZN9TiXmlTextD1Ev[TiXmlText::~TiXmlText()]+0xb): In function `ZNSt6vectorIPN14BlockAllocatorI21CodeBlocksLayoutEventLj75ELb0EE11LinkedBlockIS1_EESaIS5_EEixEj':
C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_vector.h: variable 'vtable for TiXmlText' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
obj\Debug\TestPlugin.o(.text$_ZN9TiXmlTextC1EPKc[TiXmlText::TiXmlText(char const*)]+0x54):C:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_vector.h: variable 'vtable for TiXmlText' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings
I'm using Windows XP x64 and mingw 5.0.3 (gcc 3.4.2) and the latest SVN version of Code::Blocks.
I can't reproduce it with Ubuntu Linux (Dapper), GCC 4.0.3, C::B revision 2820.