Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Internal Error during BuildLibrary (VS2010 - MFC project)

Posted on 2011-02-10
8
Medium Priority
?
1,133 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 86

Accepted Solution

by:
jkr earned 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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.
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.

885 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