Solved

Internal Error during BuildLibrary (VS2010 - MFC project)

Posted on 2011-02-10
8
1,054 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
 
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now