Solved

Internal Error during BuildLibrary (VS2010 - MFC project)

Posted on 2011-02-10
8
1,077 Views
Last Modified: 2012-05-11
Hi Experts,
I have the following error in one of my solutions, kind of all over the place - but only in 1 of my solutions...  Have you seen this?

>LINK : fatal error LNK1000: Internal error during BuildLibrary
1>  
1>    Version 10.00.30319.01
1>  
1>    ExceptionCode            = C0000005
1>    ExceptionFlags           = 00000000
1>    ExceptionAddress         = 5CA52803 (5C870000) "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\c2.dll"
1>    NumberParameters         = 00000002
1>    ExceptionInformation[ 0] = 00000000
1>    ExceptionInformation[ 1] = 52414D49
1>  
1>  CONTEXT:
1>    Eax    = 00000025  Esp    = 0035D5D4
1>    Ebx    = 0035D694  Ebp    = 0035D5EC
1>    Ecx    = 52414D49  Esi    = 5CADD2EC
1>    Edx    = 56D370FA  Edi    = 5CAD3622
1>    Eip    = 5CA52803  EFlags = 00010202
1>    SegCs  = 00000023  SegDs  = 0000002B
1>    SegSs  = 0000002B  SegEs  = 0000002B
1>    SegFs  = 00000053  SegGs  = 0000002B
1>    Dr0    = 00000000  Dr3    = 00000000
1>    Dr1    = 00000000  Dr6    = 00000000
1>    Dr2    = 00000000  Dr7    = 00000000
1>
1>Build FAILED.

I also have the following warning before this happens:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1151,5): warning MSB8012: TargetPath(C:\dev\OpenGLGraph\MyProject\Release\Utility.lib) does not match the Library's OutputFile property value (C:\devlio2008\Utility\Release\Utility.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
1>Lib:

I've tried everything I can think of to try to set those variables correctly, but I just don't understand - and I'm not even sure which variables to try to modify...

Please help if you can and thanks,
Mike
0
Comment
Question by:thready
  • 4
  • 4
8 Comments
 
LVL 1

Author Comment

by:thready
ID: 34867005
By the way, I'm using Windows 7 and I just tried compiling the same project on a Windows XP machine and it compiled fine.  Either it's Windows 7 or I have a corrupt file somewhere.......  What should I do?
0
 
LVL 86

Expert Comment

by:jkr
ID: 34867013
MS 'answers' that at http://connect.microsoft.com/VisualStudio/feedback/details/523864/how-to-fix-msb8012-lib-outputfile:

---------------------------------------->8-----------------------------

About the original bug the warning is generated because in Visual Studio 2010 we have moved the C++ build system to be based on MSBuild. In earlier versions of Visual Studio when you changed the output file property the "TargetName" "TargetExt" properties were changed in background by the product itself. In this release we dont have that functionality and we have now become more transparent and warn the user to make sure that the output file property does match with the "OutDir" "TargetName" and "TargetExt" properties.

Your can change %(lib.outputfile) by going to project properties "Configuration Properties->Librarian->Output File".

---------------------------------------->8-----------------------------

More on that at http://blogs.msdn.com/b/vcblog/archive/2010/03/02/visual-studio-2010-c-project-upgrade-guide.aspx ("Visual Studio 2010 C++ Project Upgrade Guide")
0
 
LVL 1

Author Comment

by:thready
ID: 34867415
Thanks for that jkr, but the warning was not the problem.  I'm able to get around the warning now, but now I'm left with this:

1>------ Build started: Project: Utility, Configuration: Release Win32 ------
1>Build started 10/02/2011 7:34:20 PM.
1>InitializeBuildStatus:
1>  Touching "Release\Utility.unsuccessfulbuild".
1>ClCompile:
1>  All outputs are up-to-date.
1>  All outputs are up-to-date.
1>  All outputs are up-to-date.
1>  All outputs are up-to-date.
1>ResourceCompile:
1>  All outputs are up-to-date.
1>Lib:
1>  
1>LINK : fatal error LNK1000: Internal error during BuildLibrary
1>  
1>    Version 10.00.30319.01
1>  
1>    ExceptionCode            = C0000005
1>    ExceptionFlags           = 00000000
1>    ExceptionAddress         = 59302803 (59120000) "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\c2.dll"
1>    NumberParameters         = 00000002
1>    ExceptionInformation[ 0] = 00000000
1>    ExceptionInformation[ 1] = 52414D49
1>  
1>  CONTEXT:
1>    Eax    = 00000025  Esp    = 002ADA04
1>    Ebx    = 002ADAC4  Ebp    = 002ADA1C
1>    Ecx    = 52414D49  Esi    = 5938D2EC
1>    Edx    = 534B70FA  Edi    = 59383622
1>    Eip    = 59302803  EFlags = 00010202
1>    SegCs  = 00000023  SegDs  = 0000002B
1>    SegSs  = 0000002B  SegEs  = 0000002B
1>    SegFs  = 00000053  SegGs  = 0000002B
1>    Dr0    = 00000000  Dr3    = 00000000
1>    Dr1    = 00000000  Dr6    = 00000000
1>    Dr2    = 00000000  Dr7    = 00000000
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.80

I even tried copying that c2.dll over my own in case it was corrupt, no luck....
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 34868017
Don't worry about copying the file, he error message clearly states

1>    ExceptionCode            = C0000005

which simply is STATUS_ACCESS_VIOLATION inside link.exe - have you considered contacting MS' support?
0
 
LVL 1

Author Closing Comment

by:thready
ID: 34868228
Thank you again jkr!  Any idea what's the best way to contact them?
0
 
LVL 86

Expert Comment

by:jkr
ID: 34876970
Let me see - there should be a way from within Visual Studio, yet I am not quite sure where exactly at the moment, but should able to check that tomorrow...
0
 
LVL 1

Author Comment

by:thready
ID: 34878203
It's ok jkr, I submitted the bug report through support.Microsoft.com.  Have a good weekend!
0
 
LVL 86

Expert Comment

by:jkr
ID: 34880115
Thank you ;o)

BTW, it's quite simple, the 'Help' menu has an entry labelled 'Technical Support'.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question