Very weird errors when linking (LNK1000)? - c++

Error 1 fatal error LNK1000: Internal
error during
IncrBuildImage MFC_Test MFC_Test
Why do I get this weird error every 2nd time I compile?

It is a bug in link.exe. Apply this hotfix https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=11399

Related

Error compiling Google Protocol Buffer Output (C++)

Update #2: Issue closed, but curious about all the error messages.
I got it to compile after including #define PROTOBUF_USE_DLLS. After the build, the Error List still shows 398 errors and the output window lists a lot of warnings, but it still compiled. Why is that?
I downloaded the Google Protocol Buffer source and was able to compile it without issues on Visual Studio 2015. However, the Google Protocol Buffer compiler generates C++ output that has a lot of compile errors. Is the compiler output below compatible with Visual Studio 2015 (C++14, I think)? Looks like a later standard of C++. If it's not, does anyone familiar with Google Protocol Buffer for C++ know how to make it output VS2015-friendly output? I downloaded from here: https://github.com/protocolbuffers/protobuf/releases
Update: Here's the compiler output:
1> Creating library C:\DEV\Visual Studio 2015\Projects\DEV\VSSolution\x64\Debug\Monitor.lib and object C:\DEV\Visual Studio 2015\Projects\DEV\VSSolution\x64\Debug\Monitor.exp
1>msgcore.pb.obj : error LNK2001: unresolved external symbol "class google::protobuf::internal::ExplicitlyConstructed<class std::basic_string<char,struct std::char_traits,class std::allocator >,8> google::protobuf::internal::fixed_address_empty_string" (?fixed_address_empty_string#internal#protobuf#google##3V?$ExplicitlyConstructed#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##$07#123#A)
1>C:\DEV\Visual Studio 2015\Projects\DEV\VSSolution\x64\Debug\Monitor.dll : fatal error LNK1120: 1 unresolved externals
Strange, I see 510 compiler errors under the Error List tab of Visual Studio, but under the compiler output, I only see the one unresolved externals error above. That's a linking error implying that it already compiled? How come I don't see the compiler errors high-lighted in the screenshot below and on the Error List in the Output window?
The errors turned out to be Visual Studio Intellisense errors and not "actual" compile errors. For the one linking error, the issue was resolved by adding #define PROTOBUF_USE_DLLS to the protoc-generated C++ output.

error C1090: PDB API call failed, error code '0' : '

I'm trying to compile a c ++ project in Visual Studio 2013 but I get the following error
error C1090: PDB API call failed, error code '0' : '
I need help!
I saw this error with MSVC 2017. I had a compile error in one file (missing a closing parenthesis). This error happened on all following files. Fixing the first compile error made them go away.

How to hide the linker warning start with AL (ALINK)

I got this warning while compiling the VC++ project.
1>ALINK : warning AL1073: Referenced assembly 'mscorlib.dll' targets a different processor
I think it is safe to hide this in my situation (concluded). How to ignore the linking ALINK errors.
/ignore:1073 or /ignore:AL1073 doesn't work. It gives me this error
1>LINK : fatal error LNK1147: invalid number specified with option '/ignore:1073'

How to find syntax errors using Microsoft Visual Studio 2012 in c++?

I have made sure that InteliSense is turned on and that nothing is disabled while I use the IDE. I don't see a way for me to tell where the syntax errors in my code are. When I try to build the project it just gives me that "failed" report and there are no syntax errors being reported in the error box.
http://imageshack.us/f/850/visualt.jpg/
The only errors its giving me are :
Error 2 error LNK1169: one or more multiply defined symbols found C:\Users\Artur\Documents\Visual Studio 2012\Projects\Project2\Debug\Project2.exe 1 1 Project2
Error 1 error LNK2005: _main already defined in Portfolio Program 2.obj C:\Users\Artur\Documents\Visual Studio 2012\Projects\Project2\Project2\Source.obj Project2
These don't seem to make any sense to me.
Visual Studio would normally give you syntax errors if there are any in your C++ code. The error message you're getting suggest that you're linking two modules together that both contain a definition of main(). That won't work as the linker will not be able to determine which of the two main() functions to use as an entry point into the program. So, check your linker and project dependencies.
You have source.cpp in resources. This is wrong.

Internal linker error using comsupp.lib

I've searched around here and a few other sites and still the linker error I'm having doesn't seem to be in there or my reading comprehension is failing me today.
The errors VS2010 is giving me are as follows:
Error 10 error LNK2001: unresolved external symbol "void __stdcall
_com_issue_error(long)" (?_com_issue_error##$$FYGXJ#Z)
Error 11 error LNK1120: 1 unresolved externals
I cannot seem to find anywhere what function is missing its external so I know what I should be importing or at the very least including in the linker so debugging it is proving a little hard.
Didn't even think to add this, but when I try and add comsupp to my linker I get the following errors (also my link.exe actually crashes and asks me if I want to send a debug report to Microsoft):
Error 15 error C1001: An internal error has occurred in the compiler.
Error 16 error LNK1000: Internal error during IMAGE::BuildImage
Do include comdef.h, but don't include comutil.h
Project Property ->Linker -> Input ->Additional Dependencies.
Add comsuppd.lib (or comsuppwd.lib) if it's debug mode.
Add comsupp.lib (or comsuppw.lib) if it's release mode.