By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,606 Members | 2,019 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,606 IT Pros & Developers. It's quick & easy.

managed C++ link error

P: n/a
I'm getting the following error when attempting to link a
managed C++ dll. I can't find any reference to these
errors with google. Can anyone help? I've included the
class definition causing the errors below.

Everything compiles fine and all the types are defined, it
appears that the template type
itga::order_collection::iterator is causing the trouble.

Gary.

Compiling...
OrderEnumerator.cpp
Linking...
Creating library z:\bin\ITGAdotnetd.lib and object
z:\bin\ITGAdotnetd.exp
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131187) : Inconsistent method declarations in
duplicated types (types: OrderEnumerator; methods: .ctor):
(0x06000001).
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131188) : Inconsistent field declarations in
duplicated types (types: OrderEnumerator; fields:
m_current): (0x04000013).
LINK : fatal error LNK1215: metadata operation failed
(80131130) :

Build log was saved
at "file://z:\src\desk\client\dotnet\Debug\BuildLog.htm"
ITGAdotnet - 3 error(s), 0 warning(s)

---------------------------------------------------------

public __gc class OrderEnumerator : public
System::Collections::IEnumerator
{
public:

OrderEnumerator(const itga::order_collection_ptr&
collection,
const
itga::order_collection::iterator& position);

~OrderEnumerator();

__property System::Object* get_Current();
bool MoveNext();
void Reset();

private:

itga::order_collection_ptr* m_orders;
itga::order_collection::iterator* m_current;

};

Nov 16 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
I've had this before and was never able to narrow down the exact cause, but
is seemed to have to do with the order of #using<> statements (esp. when
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.

Brian

"Gary Hughes" <ge*@itga.com.au> wrote in message
news:08****************************@phx.gbl...
I'm getting the following error when attempting to link a
managed C++ dll. I can't find any reference to these
errors with google. Can anyone help? I've included the
class definition causing the errors below.

Everything compiles fine and all the types are defined, it
appears that the template type
itga::order_collection::iterator is causing the trouble.

Gary.

Compiling...
OrderEnumerator.cpp
Linking...
Creating library z:\bin\ITGAdotnetd.lib and object
z:\bin\ITGAdotnetd.exp
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131187) : Inconsistent method declarations in
duplicated types (types: OrderEnumerator; methods: .ctor):
(0x06000001).
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131188) : Inconsistent field declarations in
duplicated types (types: OrderEnumerator; fields:
m_current): (0x04000013).
LINK : fatal error LNK1215: metadata operation failed
(80131130) :

Build log was saved
at "file://z:\src\desk\client\dotnet\Debug\BuildLog.htm"
ITGAdotnet - 3 error(s), 0 warning(s)

---------------------------------------------------------

public __gc class OrderEnumerator : public
System::Collections::IEnumerator
{
public:

OrderEnumerator(const itga::order_collection_ptr&
collection,
const
itga::order_collection::iterator& position);

~OrderEnumerator();

__property System::Object* get_Current();
bool MoveNext();
void Reset();

private:

itga::order_collection_ptr* m_orders;
itga::order_collection::iterator* m_current;

};


Nov 16 '05 #2

P: n/a
Thanks for the clues Brian but no joy. I have stripped
things down so that I have four files.

OrderEnumerator.h
OrderEnumerator.cpp
OrderCollection.h
OrderCollection.cpp

These files are not included in any other project files.
Adding #include "OrderEnumerator.h" to OrderCollection.cpp
causes the error in question. I don't actually use
anything from OrderEnumerator.h I just include the file.
There are no #using statements in these files. I include
the definitions of the itga:: stuff via stdafx.h, I have
tried including them directly in both the header and cpp
files in question as well.
Furthermore if I comment out the use of
itga::order_collection::iterator then the problem goes
away. Everything compiles fine and I use the
itga::order_collection::iterator elsewhere (in a plain cpp
library and a COM wrapper library) with no problems both
with VC++ and G++ on solaris.

All the unerlying cpp files have include guards and the
managed header files all have #pragma once.

It appears VC++ is generating some kind of symbol
information and getting it wrong, maybe involving forward
declarations?

btw, I'm using visual studio 2003.

Does anyone have any clues?
-----Original Message-----
I've had this before and was never able to narrow down the exact cause, butis seemed to have to do with the order of #using<> statements (esp. whenyou're including header files that also have #using<> statements). Makesure you're not #using anything twice if you don't need to or at all if youdon't need it.

Brian

"Gary Hughes" <ge*@itga.com.au> wrote in message
news:08****************************@phx.gbl...
I'm getting the following error when attempting to link a managed C++ dll. I can't find any reference to these
errors with google. Can anyone help? I've included the
class definition causing the errors below.

Everything compiles fine and all the types are defined, it appears that the template type
itga::order_collection::iterator is causing the trouble.

Gary.

Compiling...
OrderEnumerator.cpp
Linking...
Creating library z:\bin\ITGAdotnetd.lib and object
z:\bin\ITGAdotnetd.exp
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131187) : Inconsistent method declarations in
duplicated types (types: OrderEnumerator; methods: .ctor): (0x06000001).
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131188) : Inconsistent field declarations in
duplicated types (types: OrderEnumerator; fields:
m_current): (0x04000013).
LINK : fatal error LNK1215: metadata operation failed
(80131130) :

Build log was saved
at "file://z:\src\desk\client\dotnet\Debug\BuildLog.htm"
ITGAdotnet - 3 error(s), 0 warning(s)

-------------------------------------------------------- -
public __gc class OrderEnumerator : public
System::Collections::IEnumerator
{
public:

OrderEnumerator(const itga::order_collection_ptr&
collection,
const
itga::order_collection::iterator& position);

~OrderEnumerator();

__property System::Object* get_Current();
bool MoveNext();
void Reset();

private:

itga::order_collection_ptr* m_orders;
itga::order_collection::iterator* m_current;

};


.

Nov 16 '05 #3

P: n/a
Furthermore if I simply put all the code from
OrderEnumerator.[h|cpp] into OrderCollection.cpp it
compiles and links without a problem.
-----Original Message-----
Thanks for the clues Brian but no joy. I have stripped
things down so that I have four files.

OrderEnumerator.h
OrderEnumerator.cpp
OrderCollection.h
OrderCollection.cpp

These files are not included in any other project files.
Adding #include "OrderEnumerator.h" to OrderCollection.cppcauses the error in question. I don't actually use
anything from OrderEnumerator.h I just include the file.
There are no #using statements in these files. I include
the definitions of the itga:: stuff via stdafx.h, I have
tried including them directly in both the header and cpp
files in question as well.
Furthermore if I comment out the use of
itga::order_collection::iterator then the problem goes
away. Everything compiles fine and I use the
itga::order_collection::iterator elsewhere (in a plain cpplibrary and a COM wrapper library) with no problems both
with VC++ and G++ on solaris.

All the unerlying cpp files have include guards and the
managed header files all have #pragma once.

It appears VC++ is generating some kind of symbol
information and getting it wrong, maybe involving forward
declarations?

btw, I'm using visual studio 2003.

Does anyone have any clues?
-----Original Message-----
I've had this before and was never able to narrow downthe exact cause, but
is seemed to have to do with the order of #using<>

statements (esp. when
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.

Brian

"Gary Hughes" <ge*@itga.com.au> wrote in message
news:08****************************@phx.gbl...
I'm getting the following error when attempting to linka
managed C++ dll. I can't find any reference to these
errors with google. Can anyone help? I've included the
class definition causing the errors below.

Everything compiles fine and all the types are
defined,
it appears that the template type
itga::order_collection::iterator is causing the
trouble.
Gary.

Compiling...
OrderEnumerator.cpp
Linking...
Creating library z:\bin\ITGAdotnetd.lib and object
z:\bin\ITGAdotnetd.exp
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131187) : Inconsistent method declarations in
duplicated types (types: OrderEnumerator;
methods: .ctor): (0x06000001).
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131188) : Inconsistent field declarations in
duplicated types (types: OrderEnumerator; fields:
m_current): (0x04000013).
LINK : fatal error LNK1215: metadata operation failed
(80131130) :

Build log was saved
at "file://z:\src\desk\client\dotnet\Debug\BuildLog.htm" ITGAdotnet - 3 error(s), 0 warning(s)

-------------------------------------------------------
--
public __gc class OrderEnumerator : public
System::Collections::IEnumerator
{
public:

OrderEnumerator(const itga::order_collection_ptr&
collection,
const
itga::order_collection::iterator& position);

~OrderEnumerator();

__property System::Object* get_Current();
bool MoveNext();
void Reset();

private:

itga::order_collection_ptr* m_orders;
itga::order_collection::iterator* m_current;

};


.

.

Nov 16 '05 #4

P: n/a
-----Original Message-----

--------------------
From: "Gary Hughes" <ge*@itga.com.au>
Subject: managed C++ link error
Date: Tue, 5 Aug 2003 21:43:37 -0700
Message-ID: <08****************************@phx.gbl>

I'm getting the following error when attempting to link amanaged C++ dll. I can't find any reference to these
errors with google. Can anyone help? I've included the
class definition causing the errors below.

Everything compiles fine and all the types are defined, itappears that the template type
itga::order_collection::iterator is causing the trouble.

Gary.

Compiling...
OrderEnumerator.cpp
Linking...
Creating library z:\bin\ITGAdotnetd.lib and object
z:\bin\ITGAdotnetd.exp
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131187) : Inconsistent method declarations in
duplicated types (types: OrderEnumerator; methods: .ctor):(0x06000001).
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131188) : Inconsistent field declarations in
duplicated types (types: OrderEnumerator; fields:
m_current): (0x04000013).
LINK : fatal error LNK1215: metadata operation failed
(80131130) :

Build log was saved
at "file://z:\src\desk\client\dotnet\Debug\BuildLog.htm"
ITGAdotnet - 3 error(s), 0 warning(s)

---------------------------------------------------------

public __gc class OrderEnumerator : public
System::Collections::IEnumerator
{
public:

OrderEnumerator(const itga::order_collection_ptr&
collection,
const
itga::order_collection::iterator& position);

~OrderEnumerator();

__property System::Object* get_Current();
bool MoveNext();
void Reset();

private:

itga::order_collection_ptr* m_orders;
itga::order_collection::iterator* m_current;

};


This usually happens because somehow the compiler puts

slightly differentmetadata in two modules for the same type. At link time, when the metadatais merged, this error is emitted because the name for the type is the same,but there is some descrepancy in the rest of the metadata describing thattype. The first thing I would look at are the command line options used tocompile the two modules, and then I would look at the includes leading upto the definition of the type for the two modules. Both of these things cansometimes 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 theincludes or the command line options.

I hope this helps. Good luck!

--
Daniel Tomko, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.


Hi Daniel,

No luck still, the two files in question
OrderCollection.cpp and OrderEnumerator.cpp have exactly
the same build options. They each include the unmanaged
code through a single header which is included in stdafx.h.

I used metainfo to dump the .obj files and I can't see any
differences in the type in question
itga::order_collection::iterator, although I am admittedly
inexperienced with this and could be missing something.

I had initially thought it must be something along the
lines of what you mentioned with include order causing the
problem however I don't see how this can be the case as
the type is included from one point only.

I've tried creating a simple test case but have been
unable to do so.

Gary.
Nov 16 '05 #5

P: n/a

--------------------
From: "Gary Hughes" <ge*@itga.com.au>
Sender: "Gary Hughes" <ge*@itga.com.au>
Subject: RE: managed C++ link error
Date: Thu, 7 Aug 2003 22:36:22 -0700
Message-ID: <05****************************@phx.gbl>

-----Original Message-----

--------------------
From: "Gary Hughes" <ge*@itga.com.au>
Subject: managed C++ link error
Date: Tue, 5 Aug 2003 21:43:37 -0700
Message-ID: <08****************************@phx.gbl>

I'm getting the following error when attempting to linkamanaged C++ dll. I can't find any reference to these
errors with google. Can anyone help? I've included the
class definition causing the errors below.

Everything compiles fine and all the types are defined,itappears that the template type
itga::order_collection::iterator is causing the trouble.

Gary.

Compiling...
OrderEnumerator.cpp
Linking...
Creating library z:\bin\ITGAdotnetd.lib and object
z:\bin\ITGAdotnetd.exp
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131187) : Inconsistent method declarations in
duplicated types (types: OrderEnumerator;methods: .ctor):(0x06000001).
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131188) : Inconsistent field declarations in
duplicated types (types: OrderEnumerator; fields:
m_current): (0x04000013).
LINK : fatal error LNK1215: metadata operation failed
(80131130) :

Build log was saved
at "file://z:\src\desk\client\dotnet\Debug\BuildLog.htm"
ITGAdotnet - 3 error(s), 0 warning(s)

---------------------------------------------------------

public __gc class OrderEnumerator : public
System::Collections::IEnumerator
{
public:

OrderEnumerator(const itga::order_collection_ptr&
collection,
const
itga::order_collection::iterator& position);

~OrderEnumerator();

__property System::Object* get_Current();
bool MoveNext();
void Reset();

private:

itga::order_collection_ptr* m_orders;
itga::order_collection::iterator* m_current;

};



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 descrepancy 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.

I hope this helps. Good luck!

--
Daniel Tomko, Visual C++ Team
This posting is provided AS IS with no warranties, and

confers no rights.


Hi Daniel,

No luck still, the two files in question
OrderCollection.cpp and OrderEnumerator.cpp have exactly
the same build options. They each include the unmanaged
code through a single header which is included in stdafx.h.

I used metainfo to dump the .obj files and I can't see any
differences in the type in question
itga::order_collection::iterator, although I am admittedly
inexperienced with this and could be missing something.

I had initially thought it must be something along the
lines of what you mentioned with include order causing the
problem however I don't see how this can be the case as
the type is included from one point only.

I've tried creating a simple test case but have been
unable to do so.

Gary.


Would it be possible to try this without precompiled headers? I'm just
thinking of ways to reduce complexity to narrow down the problem.

--
Daniel Tomko, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.

Nov 16 '05 #6

P: n/a
-----Original Message-----

--------------------
From: "Gary Hughes" <ge*@itga.com.au>
Sender: "Gary Hughes" <ge*@itga.com.au>
Subject: RE: managed C++ link error
Date: Thu, 7 Aug 2003 22:36:22 -0700
Message-ID: <05****************************@phx.gbl>

-----Original Message-----

--------------------
From: "Gary Hughes" <ge*@itga.com.au>
Subject: managed C++ link error
Date: Tue, 5 Aug 2003 21:43:37 -0700
Message-ID: <08****************************@phx.gbl>

I'm getting the following error when attempting to link
a
managed C++ dll. I can't find any reference to these
errors with google. Can anyone help? I've included the
class definition causing the errors below.

Everything compiles fine and all the types are
defined,it
appears that the template type
itga::order_collection::iterator is causing the
trouble.
Gary.

Compiling...
OrderEnumerator.cpp
Linking...
Creating library z:\bin\ITGAdotnetd.lib and object
z:\bin\ITGAdotnetd.exp
OrderEnumerator.obj : error LNK2022: metadata operationfailed (80131187) : Inconsistent method declarations induplicated types (types: OrderEnumerator;methods: .ctor):
(0x06000001).
OrderEnumerator.obj : error LNK2022: metadata operationfailed (80131188) : Inconsistent field declarations in
duplicated types (types: OrderEnumerator; fields:
m_current): (0x04000013).
LINK : fatal error LNK1215: metadata operation failed
(80131130) :

Build log was saved
at "file://z:\src\desk\client\dotnet\Debug\BuildLog.htm "ITGAdotnet - 3 error(s), 0 warning(s)

------------------------------------------------------- --
public __gc class OrderEnumerator : public
System::Collections::IEnumerator
{
public:

OrderEnumerator(const itga::order_collection_ptr&
collection,
const
itga::order_collection::iterator& position);

~OrderEnumerator();

__property System::Object* get_Current();
bool MoveNext();
void Reset();

private:

itga::order_collection_ptr* m_orders;
itga::order_collection::iterator* m_current;

};



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
thetype is the same,
but there is some descrepancy in the rest of the
metadatadescribing 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'tyield 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.

I hope this helps. Good luck!

--
Daniel Tomko, Visual C++ Team
This posting is provided AS IS with no warranties, and

confers no rights.


Hi Daniel,

No luck still, the two files in question
OrderCollection.cpp and OrderEnumerator.cpp have exactly
the same build options. They each include the unmanaged
code through a single header which is included in stdafx.h.
I used metainfo to dump the .obj files and I can't see anydifferences in the type in question
itga::order_collection::iterator, although I am admittedlyinexperienced with this and could be missing something.

I had initially thought it must be something along the
lines of what you mentioned with include order causing theproblem however I don't see how this can be the case as
the type is included from one point only.

I've tried creating a simple test case but have been
unable to do so.

Gary.


Would it be possible to try this without precompiled

headers? I'm justthinking of ways to reduce complexity to narrow down the problem.


I've already tried that, I've also tried to create a
separate project with a really simple test case but I
can't get it to fail so somehow the complexity of the real
project is making it break.

Gary.
Nov 16 '05 #7

P: n/a

--------------------
From: "Gary Hughes" <ge*@itga.com.au>
Sender: "Gary Hughes" <ge*@itga.com.au>
Subject: Re: managed C++ link error
Date: Wed, 6 Aug 2003 22:25:59 -0700
Message-ID: <09****************************@phx.gbl>

Furthermore if I simply put all the code from
OrderEnumerator.[h|cpp] into OrderCollection.cpp it
compiles and links without a problem.
-----Original Message-----
Thanks for the clues Brian but no joy. I have stripped
things down so that I have four files.

OrderEnumerator.h
OrderEnumerator.cpp
OrderCollection.h
OrderCollection.cpp

These files are not included in any other project files.
Adding #include "OrderEnumerator.h" to

OrderCollection.cpp
causes the error in question. I don't actually use
anything from OrderEnumerator.h I just include the file.
There are no #using statements in these files. I include
the definitions of the itga:: stuff via stdafx.h, I have
tried including them directly in both the header and cpp
files in question as well.
Furthermore if I comment out the use of
itga::order_collection::iterator then the problem goes
away. Everything compiles fine and I use the
itga::order_collection::iterator elsewhere (in a plain

cpp
library and a COM wrapper library) with no problems both
with VC++ and G++ on solaris.

All the unerlying cpp files have include guards and the
managed header files all have #pragma once.

It appears VC++ is generating some kind of symbol
information and getting it wrong, maybe involving forward
declarations?

btw, I'm using visual studio 2003.

Does anyone have any clues?
-----Original Message-----
I've had this before and was never able to narrow down

the exact cause, but
is seemed to have to do with the order of #using<>

statements (esp. when
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.

Brian

"Gary Hughes" <ge*@itga.com.au> wrote in message
news:08****************************@phx.gbl.. .
I'm getting the following error when attempting tolink
a
managed C++ dll. I can't find any reference to these
errors with google. Can anyone help? I've included the
class definition causing the errors below.

Everything compiles fine and all the types are

defined,
it
appears that the template type
itga::order_collection::iterator is causing the

trouble.
Gary.

Compiling...
OrderEnumerator.cpp
Linking...
Creating library z:\bin\ITGAdotnetd.lib and object
z:\bin\ITGAdotnetd.exp
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131187) : Inconsistent method declarations in
duplicated types (types: OrderEnumerator;

methods: .ctor):
(0x06000001).
OrderEnumerator.obj : error LNK2022: metadata operation
failed (80131188) : Inconsistent field declarations in
duplicated types (types: OrderEnumerator; fields:
m_current): (0x04000013).
LINK : fatal error LNK1215: metadata operation failed
(80131130) :

Build log was saved
at "file://z:\src\desk\client\dotnet\Debug\BuildLog.htm" ITGAdotnet - 3 error(s), 0 warning(s)

-------------------------------------------------------

-
-

public __gc class OrderEnumerator : public
System::Collections::IEnumerator
{
public:

OrderEnumerator(const itga::order_collection_ptr&
collection,
const
itga::order_collection::iterator& position);

~OrderEnumerator();

__property System::Object* get_Current();
bool MoveNext();
void Reset();

private:

itga::order_collection_ptr* m_orders;
itga::order_collection::iterator* m_current;

};



.

.


Is there any way you could send us a small, self contained repro for this.
I've been playing with it a little, and haven't had any luck. I'm curious
enough about this, but really need to play with it and debug it.

If you have such a repro case, please send it directly to me. Just remove
the "online." from my email address.

--
Daniel Tomko, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.

Nov 16 '05 #8

P: n/a
Hi,
I am getting a strange LNK Error 1215 saying

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

when I am trying to declare any function in my entire project .. sometimes I reset some events it works fine ... It even happened when I tried to declare variables and used .. When I used the same code in the page load event it worked .. Dont know what is happening ? Pls help me ........ This is a real showstopper for me as I am almost on the delivery stage ..... Please please help me ...

Thanks in advance
Samarpan
From http://developmentnow.com/g/42_2003_...link-error.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Nov 17 '05 #9

P: n/a
I think I can solve your problem, same thing happened to me...

Let me guess. Your project started out under one version of the compiler
(say, 2002), and you loaded it up into another one (say, 2003), and it
converted it for you. Well, in my case, this conversion was not perfect, and
2 weeks later I also got random error 1215 errors. The compiling errors you
get will be random and not make sense (e.g., you add a line of code and
something totally unrelated that use to work stops working).

Solution? Create a BRAND NEW project under the new compiler (in the example
above, 2003) of the same type, copy your source over, and it should work
now.

This might also happen converting to 2005, but my experience was conversion
from 2002 to 2003. The weird part is it all worked great until 2 weeks
later, so that really made it tough to figure out what went wrong! The point
being that you might have converted your project a long time ago and this
still could be the cause.

By the way, if you look down lower in this newsgroup, around October 19th at
2:16PM, you'll see a thread I started when this happened to me called
"LINKER ERROR 1215"...

Let me know if that was your problem too... : )

[==P==]

"Samarpan" <sa*********@rediffmail.com> wrote in message
news:90**********************************@msnews.m icrosoft.com...
Hi,
I am getting a strange LNK Error 1215 saying

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

when I am trying to declare any function in my entire project .. sometimes
I reset some events it works fine ... It even happened when I tried to
declare variables and used .. When I used the same code in the page load
event it worked .. Dont know what is happening ? Pls help me ........ This
is a real showstopper for me as I am almost on the delivery stage .....
Please please help me ...

Thanks in advance
Samarpan
From
http://developmentnow.com/g/42_2003_...link-error.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com

Nov 17 '05 #10

P: n/a
I have the same problem. I had a .NET project which i had not used for
a while and now when i try to build i get this error:
fatal error LNK1215: metadata operation failed (8013110E) : Database
file is corrupt and may not be usable.

I tried everything and finally i changed the "Create/Use/ Precompile
header" option to "Create Precompiled Header (/Yc)" and recompiled and
to my supprise it started to work again!

hope it helps

Peter Oliphant wrote:
I think I can solve your problem, same thing happened to me...

Let me guess. Your project started out under one version of the compiler
(say, 2002), and you loaded it up into another one (say, 2003), and it
converted it for you. Well, in my case, this conversion was not perfect, and
2 weeks later I also got random error 1215 errors. The compiling errors you
get will be random and not make sense (e.g., you add a line of code and
something totally unrelated that use to work stops working).

Solution? Create a BRAND NEW project under the new compiler (in the example
above, 2003) of the same type, copy your source over, and it should work
now.

This might also happen converting to 2005, but my experience was conversion
from 2002 to 2003. The weird part is it all worked great until 2 weeks
later, so that really made it tough to figure out what went wrong! The point
being that you might have converted your project a long time ago and this
still could be the cause.

By the way, if you look down lower in this newsgroup, around October 19th at
2:16PM, you'll see a thread I started when this happened to me called
"LINKER ERROR 1215"...

Let me know if that was your problem too... : )

[==P==]

"Samarpan" <sa*********@rediffmail.com> wrote in message
news:90**********************************@msnews.m icrosoft.com...
Hi,
I am getting a strange LNK Error 1215 saying

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

when I am trying to declare any function in my entire project .. sometimes
I reset some events it works fine ... It even happened when I tried to
declare variables and used .. When I used the same code in the page load
event it worked .. Dont know what is happening ? Pls help me ........ This
is a real showstopper for me as I am almost on the delivery stage .....
Please please help me ...

Thanks in advance
Samarpan
From
http://developmentnow.com/g/42_2003_...link-error.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com


Nov 23 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.