Re: metadata operation failed (8013110E) : Database file is corrupt and may not be usable.

From: Tomas Vera (tavera_at_sbcglobal.net)
Date: 12/06/04


Date: Mon, 06 Dec 2004 16:32:44 GMT

Thanks for your reply. But.....

This is an established project that has been compiling for several
months. So the order of the #using statements is not an issue in this
case.

My WebApp is a web-based front end for our standard Windows based
product. As I develop more dialogs (to match existing Windows
dialogs), I need to add some string wrappers to the strings available
to the Windows app. This is done through an enumeration in one of my
header files. For some reason, I can only add two more members to my
enumeration. Adding a third member causes the link error.

Creating a new enumeration does not ease the problem. I have even
tried adding an additional header file with no result.

Adding this statement into a class in a header that is included after
my string header solves all my problems:
static Dword const THIS_IS_JUNK = 1;

Why???

We had similar issues with the linker two years ago that related to
the number of "__gc struct" members allowed in a single header file
(no more than 16 "__gc struct" members were allowed in a single
header. This was acknowledged as a bug my MS and has since been
corrected.

I have not been able to identify the exact conditions that cause this
problem ( I have a fast-approaching deadline). But I have a
work-around. So for now, I will simply work around this and post any
insights at a later time.

Bottom line: buggy linker (again).

-tomas vera

On Sun, 05 Dec 2004 10:39:13 GMT, mohamed.mossad@egdsc.microsoft.com
(Mohamoss) wrote:

> Hi Tomas
>In some other cases, this had to do with the order of #using<> statements
>if you're including header files that also have #using<> statements). Make
>sure you're not #using anything twice if you don't need to or at all if you
>don't need it.
>
> This usually happens because somehow the compiler puts
>slightly different metadata in two modules for the same type. At link time,
>when the metadata is merged, this error is emitted because the name for the
>type is the same, but there is some discrepancy in the rest of the metadata
>describing that type. The first thing I would look at are the command line
>options used to compile the two modules, and then I would look at the
>includes leading up to the definition of the type for the two modules. Both
>of these things can sometimes affect the metadata for a type. If these
>don't yield any clues, then I would use metainfo to dump the metadata for
>the two object files, and look for the differences that way. Often this
>will lead you back to the includes or the command line options
>
>Mohamed Mahfouz
>MEA Developer Support Center
>ITworx on behalf of Microsoft EMEA GTSC



Relevant Pages

  • Re: #ifdef
    ... It may be defined by the user, or somewhere in a header file, ... out of a larger context such as the OS source code ... C code after preprocessing but before compiling. ... in tracking down issues with preprocessor symbols. ...
    (comp.lang.c)
  • Re: #ifdef
    ... > automatically for you, if it is needed, either in a header file ... but especially for macros beginning with underscore ... > C code after preprocessing but before compiling. ... This won't help for builtins however. ...
    (comp.lang.c)
  • Re: Converting from VS.net 2003 to VS.net 2005
    ... Visula studio 2003 as the editor and everything was compiling, ... Visual Studio 2005 instead of Visual studio 2003. ... We have included the afx.h before the afxwin.h in our source code ... As a fix we tried to make a seperate header file afxdlldef.h which said ...
    (microsoft.public.dotnet.languages.vc)
  • Re: C++ api ?
    ... their members and methods available. ... > input string to int. ... > Well also one has to include the appropriate header file as well!! ...
    (comp.lang.cpp)
  • Events from the WebBrowser control
    ... The MSDN documentation for DWebBrowserEvents2 says that it derives ... when I look at the header file I ... see that DWebBrowserEvents2 derives directly from IDispatch and does not ... add any additional members. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)