[Xapian-tickets] [Xapian] #389: Incompatibility between code compiled with and without DEBUG
Xapian
nobody at xapian.org
Sun Jan 16 11:51:04 GMT 2011
#389: Incompatibility between code compiled with and without DEBUG
----------------------------+-----------------------------------------------
Reporter: charliejuggler | Owner: charliejuggler
Type: enhancement | Status: new
Priority: normal | Milestone: 1.2.x
Component: MSVC makefiles | Version: 1.0.14
Severity: normal | Keywords:
Blockedby: | Platform: Microsoft Windows
Blocking: |
----------------------------+-----------------------------------------------
Changes (by olly):
* milestone: => 1.2.x
Old description:
> Martin Margo says:
> I learned std::string class is not binary compatible between my
> driver project (VC2008 IDE) and Xapian (built using nmake). I have in my
> compile option '_DEBUG'. Once I changed my configuration manager to
> 'Release/Win32' and transferred proper header and include lib dirs, my
> program runs successfully.
>
> Olly comments:
>
> There are similar issues with GCC and _GLIBCXX_DEBUG which we handle by
> generating a check in "include/xapian/version.h" that the setting of
> _GLIBCXX_DEBUG is the same as it was when the library was built - e.g.if
> you build the library without _GLIBCXX_DEBUG, version.h contains:
>
> #ifdef _GLIBCXX_DEBUG
> #error You are compiling with _GLIBCXX_DEBUG defined, but the library
> #error was not compiled with this flag. The settings must match or your
> #error program will not work correctly.
> #endif
>
> It would be nice to have a similar check for _DEBUG under MSVC.
New description:
Martin Margo says:
I learned std::string class is not binary compatible between my
driver project (VC2008 IDE) and Xapian (built using nmake). I have in my
compile option '_DEBUG'. Once I changed my configuration manager to
'Release/Win32' and transferred proper header and include lib dirs, my
program runs successfully.
Olly comments:
There are similar issues with GCC and _GLIBCXX_DEBUG which we handle by
generating a check in "include/xapian/version.h" that the setting of
_GLIBCXX_DEBUG is the same as it was when the library was built - e.g.if
you build the library without _GLIBCXX_DEBUG, version.h contains:
{{{
#!cpp
#ifdef _GLIBCXX_DEBUG
#error You are compiling with _GLIBCXX_DEBUG defined, but the library
#error was not compiled with this flag. The settings must match or your
#error program will not work correctly.
#endif
}}}
It would be nice to have a similar check for _DEBUG under MSVC.
--
Comment:
No API or ABI issues (in fact this is catching an incompatible ABI issue)
so suitable for 1.2.x.
--
Ticket URL: <http://trac.xapian.org/ticket/389#comment:2>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list