Getting LNK2001 Unresolved external smymbol __forceCRTManifestCUR error - visual-c++

I am using VC++ 6.0 IDE for building and compiling my application.
I am getting error while compilation.
Error:- LNK2001 Unresolved external smymbol __forceCRTManifestCUR
Fatal Error LNK 1120: 1 Unresolved external.
--------Version and configuration--------
OS - Windows Server 2008 VC++ - 6.0
installed on PC
--------Other installation are------
Visual Studio 2008
Microsoft SDk 5.0
Are
C:\Program Files\MIcrosoft Visual
Studio\VC98\Include
and
C:\Program Files\Microsoft Visual
Studio 9.0\VC\Include
Conflicting..
Please help in this issue..

Related

MSB4062 in Visual Studio 2017 while Compiling a starter Visual C++ project

I am getting the following build error while compiling my project. The whole error can be seen below
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(181,5): error MSB4062: The "GetOutOfDateItems" task could not be loaded from the assembly C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.Build.CppTasks.Common.dll. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask
This error happens every time I start building the project(even the basic Visual C++ project on VS2017). Please help !

Compiler errors in standard C library headers in VS2015 - Visual C++ Console Application project

I recently created a VS2015 solution to continue development on a C++ project I had been working on. Whenever I try to build the project, I get hundreds of errors from standard C library header files such as string.h, stdio.h, etc.
To try to get to the root of the problem, I created a new, very basic, VC++ win32 console application project, wondering if I'd see the same compiler errors. Here is the code (ConsoleApplication1.cpp):
#include <string>
#include <iostream>
int main()
{
std::string s = "some data to print...";
std::cout << "Printing: " << s.c_str() << std::endl;
return 0;
}
When I attempt to compile this, I get 150+ errors, like this:
1>------ Build started: Project: ConsoleApplication1, Configuration: Release Win32 ------
1> stdafx.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(309): error C2144: syntax error: 'int' should be preceded by ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(309): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(311): error C2144: syntax error: 'int' should be preceded by ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(311): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(311): error C2086: 'int _CRTIMP_ALTERNATIVE': redefinition
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(309): note: see declaration of '_CRTIMP_ALTERNATIVE'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(317): error C2144: syntax error: 'int' should be preceded by ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(317): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(317): error C2086: 'int _CRTIMP_ALTERNATIVE': redefinition
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(309): note: see declaration of '_CRTIMP_ALTERNATIVE'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(320): error C2144: syntax error: 'int' should be preceded by ';'
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(320): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(320): error C2086: 'int _CRTIMP_ALTERNATIVE': redefinition
1> C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdio.h(309): note: see declaration of '_CRTIMP_ALTERNATIVE'
....etc
I have tried to 'repair' Microsoft VC++ 2015 Redistributable(x86) via the Windows 'Uninstall or change a program' utility, to no avail. I also tried to repair Visual Studio 2015 as a whole.
I'm on Windows 7.
Anyone have an idea what is going on here? Am I pointed to the wrong include directory or something?
It appears you have (some of) the headers from a previous version of VS installed in your VS2015 folder. The standard headers in VS2015 are stored off in a folder tied to the version of the CRT (something like c:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt). Repairing or reinstalling VS2015 won't fix this.
I think you'll need to uninstall VS2015, completely delete the folder C:\Program Files (x86)\Microsoft Visual Studio 14.0, then reinstall it. This will likely break the other version (VS2013?) that is installed there, so you might want/need to uninstall that version instead, then repair VS2015.
The header that comes with VS2015 does not appear to have the "int _CRTIMP_ALTERNATIVE" listed in some of the error messages at those lines, while the one with VS2013 does.

VC++ CefSharp Import Win32 -> x64 error

In VS2013 Community Edition, I had a Win32 VC++ clr project I've been working on. I'm trying to use the CefSharp library, and so through nuget I've imported it.
Following the steps found here I learned I had to change from Win32 to x64 as my 'Active solution platform' to avoid this:
error : CefSharp.Common does not work correctly on 'Win32' platform. You need to specify platform (x86 / x64).
However when I follow those steps and add x64 to my project through the configuration manager, I get the following compilation errors:
1>------ Build started: Project: PROJECTNAME, Configuration: Release x64 ------
1> Main.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\system_error(20): error C2869: 'std::errc' : has already been defined to be a namespace
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\system_error(101): error C2146: syntax error : missing ';' before identifier 'generic_errno'
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\system_error(101): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\system_error(101): fatal error C1903: unable to recover from previous error(s); stopping compilation
I'm not sure what is causing this or how to solve it.

LNK2019 unresolved symbol compiling LuaJava with Visual Studio 2012

I am working with visual studio 2012 to compile LuaJava. The problem I am having is when I call the linker. The line that calls the linker in the makefile is:
link /dll /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\x64"
/LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\amd64"
/out:luajava-1.1.dll src\c\luajava.obj
"C:\Program Files (x86)\Lua\5.1\lib\lua5.1.lib" /VERBOSE
This seems to almost be linking everything successfully, until it gets to the Lua library.
The linker outputs the following when I try to make the project:
...//linking of other libraries
Finished searching libraries
Unused libraries:
C:\Program Files (x86)\Lua\5.1\lib\lua5.1.lib
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib\amd64\OLDNAMES.lib
luajava.obj : error LNK2019: unresolved external symbol lua_close referenced in function Java_org_keplerproject_luajava_LuaState__1close
luajava.obj : error LNK2019: unresolved external symbol lua_newthread referenced in function Java_org_keplerproject_luajava_LuaState__1newthread
luajava.obj : error LNK2019: unresolved external symbol lua_gettop referenced in function Java_org_keplerproject_luajava_LuaState__1getTop
...//lots of these errors
luajava-1.1.dll : fatal error LNK1120: 88 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\x86_amd64\link.EXE"' : return code '0x460'
Stop.
I'm confused as to why it says that the Lua library is unused, and then complains when it can't find the Lua library functions.
You can not link a 32 bit library to your 64 bit application. After some searces I do not believe LuaJava has a x64 download so to use this you must change your application to 32 bit.
Edit:
A second method would be to recomile LuaJava as a 64 bit dll. Here is a very recent post about that: LuaJava compile error "Unresolved external symbol"

Error LNK2019 Directx10 VC++2010

I am trying to learn about DirectX 2010, after setting up the Libraries
how i installed the Libraries:-
VC++ 2010-View-other windows-Property manager
i opened the Microsoft.Cpp.Win32.user
VC++ Directories :-
Include Directories: C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include
Library Directories: C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x64
here is the Error list i get:-
Error 1 error LNK2019: unresolved external symbol _D3DX10CreateEffectFromFileW#48 referenced in function "long __cdecl InitDevice(void)" (?InitDevice##YAJXZ) c:\Users\ahmed_saad\documents\visual studio 2010\Projects\CodeName_Yarab\CodeName_Yarab\Main.obj CodeName_Yarab
Error 2 error LNK2019: unresolved external symbol _D3D10CreateDeviceAndSwapChain#32 referenced in function "long __cdecl InitDevice(void)" (?InitDevice##YAJXZ) c:\Users\ahmed_saad\documents\visual studio 2010\Projects\CodeName_Yarab\CodeName_Yarab\Main.obj CodeName_Yarab
Error 3 error LNK1120: 2 unresolved externals c:\users\ahmed_saad\documents\visual studio 2010\Projects\CodeName_Yarab\Debug\CodeName_Yarab.exe 1 1 CodeName_Yarab
i am using Windows 8 pro x64
It might be that you'll need to link to a .lib-file, because DX ist not among the usual libraries.
Look for a .lib file and add it to your Linker properties.

Resources