I'm try to build project, previously designed for MSVS 2013 C++ Compiler with Intel C++ Compiler 2015. I had created new project configuration called 'Unicode ICC Release' as a copy of standard 'Unicode Release' configuration. And after that I had changed the Platform toolset with Intel Compiler. Unfortunately, I get this error:
Error 9 error c101008c: Failed to read the manifest from the resource of file "Project.dll". The operation failed. Project\mt.exe Project
The command line of Intel linker is looks like that:
/OUT:"../../Path1/Project.dll" /MANIFEST /NXCOMPAT /PDB:"Path2\\Pdb\Project.pdb" /DYNAMICBASE /LARGEADDRESSAWARE /IMPLIB:"../Path3/Project.lib" /DEBUG /DLL /MACHINE:X86 /OPT:REF /SAFESEH /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /MANIFESTUAC:NO /ManifestFile:"Path4\Project.dll.intermediate.manifest" /OPT:ICF /NOLOGO /LIBPATH:"../Lib.Win32" /TLBID:1
And Project.dll really doesn't contain manifest!
Have any ideas how to fix this behaviour?
UPD:
MSVS linker diagnostic output:
1> Finished searching libraries
1>
1> Invoking mt.exe:
1> /verbose
1> /out:"C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{A7C6A6FD-79FB-46A7-8AF9-F8FC8729046E}.tmp"
1> /manifest
1> "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\Include\Manifest\dpiaware.manifest"
1> C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{F104CF0A-974F-45E5-97C2-C71C4265AE20}.tmp
1> Microsoft (R) Manifest Tool version 6.1.7716.0
1>
1> Copyright (c) Microsoft Corporation 2009.
1>
1> All rights reserved.
1>
1>
1> Invoking rc.exe:
1> /v
1> /x
1> /fo
1> "C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{E7AC97BB-2CBB-4C34-8140-C1BA750D564E}.tmp"
1> "C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{707AEC66-9E09-4CBF-92FF-E00B822645AC}.tmp"
1> Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
1>
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>
1> Creating C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{E7AC97BB-2CBB-4C34-8140-C1BA750D564E}.tmp
1>
1> Using codepage 1251 as default
1>
1> C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{707AEC66-9E09-4CBF-92FF-E00B822645AC}.tmp.
1> Writing 24:2, lang:0x409, size 334
1>
1> Invoking cvtres.exe:
1> /machine:x86
1> /verbose
1> /out:"C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{FEB0B0CB-A8E7-4359-BD8B-AB1996E47436}.tmp"
1> /readonly
1> "Win32\Unicode Release\Version.res"
1> "Win32\Unicode Release\Project.res"
1> "C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{E7AC97BB-2CBB-4C34-8140-C1BA750D564E}.tmp"
1> Microsoft (R) Windows Resource To Object Converter Version 12.00.21005.1
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> adding resource. type:VERSION, name:1, language:0x0000, flags:0x30, size:568
1> adding resource. type:STRING, name:7, language:0x0409, flags:0x1030, size:48
1> adding resource. type:MANIFEST, name:2, language:0x0409, flags:0x30, size:334
Intel xlink output:
1> Finished searching libraries
1>
1> Invoking cvtres.exe:
1> /machine:x86
1> /verbose
1> /out:"C:\Users\LOMONO~1.MIN\AppData\Local\Temp\lnk{3DBDEC74-99D1-4C46-8274-068BDB33431D}.tmp"
1> /readonly
1> "Win32\Unicode ICC Release\Version.res"
1> "Win32\Unicode ICC Release\Project.res"
1> Microsoft (R) Windows Resource To Object Converter Version 12.00.21005.1
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> adding resource. type:VERSION, name:1, language:0x0000, flags:0x30, size:568
1> adding resource. type:STRING, name:7, language:0x0409, flags:0x1030, size:48
Related
I'm now migrating a Qt project from another computer, both env should be Qt5.9 and Vs2015, windows8.1, msvc.
In fact, I've already passed compiling some project, so the Qt's env should be fine( I've already set Qt-vs addin tools and qt's addtional header).
But some project is showing "MSB6006: cmd.exe exited with code 2", microsoft.cppcommon.targets when I tried to build the project on new computuer using dlls.
I've traced in and vs is showing I have to deal with custombuild.
Checked verbose output of vs and found that something is different with my current qt's path:
There's fully reason to believe that something wrong with my env right now. But I haven't found them all.
path of Qt's file of addtional input and command = cl- is same with the origin computer's, but not my current path, maybe I should check some other env?
Searched for a long time on Internet. But no use. Please help or try to give some ideas how to achieve this.
1>09:49:50.555 1:2>
1>Target "CustomBuild: (TargetId:63)" in file "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets" from project "D:\MyProject\linnewTwo\SmartCheckInstrument\SmartCheckInstrument.vcxproj" (target "_BuildGenerateSourcesAction" depends on it):
1> Set Property: CustomBuildToolArchitecture=Native32Bit
1> Using "CustomBuild" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Build.CppTasks.Common.dll".
1> Task "CustomBuild" (TaskId:34)
1> Task Parameter:
1> Sources=
1> temp\moc\moc_predefs.h.cbt
1> AcceptableNonZeroExitCodes=
1> AdditionalInputs=..\..\..\..\QTINSTALL\5.9.3\5.9.3\MSVC2015\mkspecs\features\data\dummy.cpp;
1> Command=cl -Bx"D:\QtInstall\5.9.3\5.9.3\msvc2015\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E ..\..\..\..\QTINSTALL\5.9.3\5.9.3\MSVC2015\mkspecs\features\data\dummy.cpp 2>NUL >temp\moc\moc_predefs.h
1> FileType=Document
1> LinkObjects=true
1> Message=Generate moc_predefs.h
1> MinimalRebuildFromTracking=true
1> Outputs=temp\moc\moc_predefs.h;
1> TrackerLogDirectory=temp\obj\SmartChe.B419548D.tlog\
1> TreatOutputAsContent=false (TaskId:34)
1> Task Parameter:BuildSuffix=
1> :VCEnd (TaskId:34)
1> Task Parameter:TrackerLogDirectory=temp\obj\SmartChe.B419548D.tlog\ (TaskId:34)
1> Task Parameter:MinimalRebuildFromTracking=True (TaskId:34)
1> Task Parameter:TrackFileAccess=True (TaskId:34)
1> Task Parameter:ToolArchitecture=Native32Bit (TaskId:34)
1> Write Tracking Logs: (TaskId:34)
1> temp\obj\SmartChe.B419548D.tlog\custombuild.write.1.tlog (TaskId:34)
1> Read Tracking Logs: (TaskId:34)
1> temp\obj\SmartChe.B419548D.tlog\custombuild.read.1.tlog (TaskId:34)
1> No output for D:\MYPROJECT\LINNEWTWO\SMARTCHECKINSTRUMENT\TEMP\MOC\MOC_PREDEFS.H.CBT was found in the tracking log; source compilation required. (TaskId:34)
1> temp\moc\moc_predefs.h.cbt will be compiled as it was not found in the tracking log. (TaskId:34)
1> cl -Bx"D:\QtInstall\5.9.3\5.9.3\msvc2015\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E ..\..\..\..\QTINSTALL\5.9.3\5.9.3\MSVC2015\mkspecs\features\data\dummy.cpp 2>NUL >temp\moc\moc_predefs.h (TaskId:34)
1> Generate moc_predefs.h (TaskId:34)
1>09:49:50.757 1:2>
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 2.
1> Done executing task "CustomBuild" -- FAILED. (TaskId:34)
1>09:49:50.758 1:2>
new: Just checked the .sln file and found out that Qt5's path is same with previous computer, which means Qt may have written the sln file on it's own, the problem is: How am I supposed to ask Qt and vs to rewrite the sln file, so that I could change the project to a new computer safely?
Just found out the reason,there's a file called .user changing the $QDIR value while compiling, edit the value in this file, then change the path of your project in properties, check all addtional path would fix.
I am currently working on creating a virtual machine from scratch. I found a video online and I followed it, but when the time has come for me to compile my C++ program(s), the guy said to run the 'make' command to compile it. I used NMake using my Visual Studio Developer Command Prompt and it gave me this error message:
cl -std=c++11 -c stack-vm.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29112 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
stack-vm.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\ostream(285): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\ostream(270): note: while compiling class template member function 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)'
stack-vm.cpp(53): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::basic_ostream<char,std::char_traits<char>>::operator <<(int)' being compiled
stack-vm.cpp(49): note: see reference to class template instantiation 'std::basic_ostream<char,std::char_traits<char>>' being compiled
cl -std=c++11 -c main.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29112 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
main.cpp
cl -std=c++11 stack-vm.o main.o -o stack-vm
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29112 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cl : Command line warning D9024 : unrecognized source file type 'stack-vm.o', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'main.o', object file assumed
Microsoft (R) Incremental Linker Version 14.27.29112.0
Copyright (C) Microsoft Corporation. All rights reserved.
/out:stack-vm.exe
/out:stack-vm.exe
stack-vm.o
main.o
LINK : fatal error LNK1181: cannot open input file 'stack-vm.o'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x86\cl.EXE"' : return code '0x2'
Stop.
NOTE: I have a makefile setup already.
Can anybody help me understand this error? If you need source code, just reach out to me.
Thank you so much!
I am trying to compile libffm on my windows 10 machine:
https://github.com/guestwalk/libffm
I have Visual Studio Express 2013 installed and am using the VS2013 x64 Cross Tools Command Prompt to try and compile the package.
e:\libffm\nmake -f Makefile.win clean all
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
erase /Q *.obj *.exe windows\.
rd windows
mkdir windows
cl.exe /nologo /O2 /EHsc /D "_CRT_SECURE_NO_DEPRECATE" /D "USEOMP" /openmp -c ffm.cpp
ffm.cpp
ffm.cpp(1) : warning C4068: unknown pragma
cl.exe /nologo /O2 /EHsc /D "_CRT_SECURE_NO_DEPRECATE" /D "USEOMP" /openmp ffm-train.cpp ffm.obj -Fewindows\ffm-train.exe
ffm-train.cpp
ffm-train.cpp(1) : warning C4068: unknown pragma
LINK : fatal error LNK1104: cannot open file 'libcpmt.lib'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\x86_amd64\cl.exe"' : return code '0x2'
Stop.
I read that it maybe issues with my environment variables so have reinstalled the tools for C++ for VS2013 Express.
When I check the path variables I get:
echo %LIB%
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64;
echo %LIBPATH%
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64;C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral;
any ideas what to try next?
Using VC++ 2010
Compiling with OpenSSL libraries to make a SHA512 hash...
getting this build error:
1>------ Build started: Project: Second, Configuration: Debug Win32 ------
1> stdafx.cpp
1> AssemblyInfo.cpp
1>Second.cpp
1> Second.cpp(64): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf'
1> Generating Code...
1> .NETFramework,Version=v4.0.AssemblyAttributes.cpp
1> Microsoft (R) Incremental Linker Version 10.00.40219.01
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> "/OUT:C:\Users\Boss\documents\visual studio 2010\Projects\Second\Debug\Second.exe" /INCREMENTAL "C:\Program Files\OpenSSL-Win32\lib\VC\static\ssleay32MD.lib" "C:\Program Files\OpenSSL-Win32\lib\VC\static\libeay32MD.lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /ASSEMBLYRESOURCE:Debug\Second.Form1.resources /MANIFEST "/ManifestFile:Debug\Second.exe.intermediate.manifest" "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /DEBUG "/PDB:C:\Users\Boss\documents\visual studio 2010\Projects\Second\Debug\Second.pdb" /ASSEMBLYDEBUG /SUBSYSTEM:WINDOWS /TLBID:1 "/ENTRY:main" /DYNAMICBASE /FIXED:NO /NXCOMPAT /MACHINE:X86 Debug\app.res
1> Debug\AssemblyInfo.obj
1> Debug\Second.obj
1> Debug\stdafx.obj
1> "Debug\.NETFramework,Version=v4.0.AssemblyAttributes.obj"
1>libeay32MD.lib(obj_dat.obj) : error LNK2019: unresolved external symbol ___report_rangecheckfailure referenced in function _OBJ_create_objects
1>libeay32MD.lib(b_print.obj) : error LNK2001: unresolved external symbol ___report_rangecheckfailure
1>C:\Users\Boss\documents\visual studio 2010\Projects\Second\Debug\Second.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Tried disabling buffer overrun security check, same error..
Any thoughts? Tried all day with Crypto++, to no avail, OpenSSL was much easier, just hung up on this one error...
It looks as though you are trying to link to OpenSSL libraries that were built with a later version of the compiler.
Function ___report_rangecheckfailure was introduced in more recent versions of Visual Studio (see http://blogs.microsoft.com/cybertrust/2012/01/26/enhancements-to-gs-in-visual-studio-11/ for details).
So the linker is looking in the VS2010 libraries to find a function that didn't exist until later.
The maintainer of at least one of the pre-built OpenSSL libraries for Windows has recently switched from using an earlier version of Visual Studio, which may be the trigger for your problems.
One solution is to build your own OpenSSL Windows binaries with VS2010 (See http://developer.covenanteyes.com/building-openssl-for-visual-studio/ for example).
I am trying to build cryptopp 5.6.2 with msvc 2010. According to Readme.txt file in project's directory, if you want to compile project as a static library that contains all algorithms, you should build cryptest project. So i select this project from solutions and try to build it. But i get this message :
1>------ Build started: Project: cryptest, Configuration: Debug Win32 ------
1>Build started 12/30/2013 9:43:43 PM.
1>InitializeBuildStatus:
1> Touching "Win32\cryptest\Debug\cryptest.unsuccessfulbuild".
1>ClCompile:
1> adhoc.cpp
1>c1xx : fatal error C1083: Cannot open source file: 'adhoc.cpp': No such file or directory
1> bench.cpp
1> bench2.cpp
1> datatest.cpp
1> dlltest.cpp
1> fipsalgt.cpp
1> regtest.cpp
1> test.cpp
1> validat1.cpp
1> validat2.cpp
1> validat3.cpp
1> Generating Code...
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:26.23
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
There is adhoc.cpp.PROTO in project's firectory. I change it's suffix to .cpp and try to build it again. But i get this Message :
1>------ Build started: Project: cryptest, Configuration: Debug Win32 ------
1>Build started 12/30/2013 9:51:24 PM.
1>InitializeBuildStatus:
1> Touching "Win32\cryptest\Debug\cryptest.unsuccessfulbuild".
1>ClCompile:
1> adhoc.cpp
1> bench.cpp
1> bench2.cpp
1> datatest.cpp
1> dlltest.cpp
1> fipsalgt.cpp
1> regtest.cpp
1> test.cpp
1> validat1.cpp
1> validat2.cpp
1> validat3.cpp
1> Generating Code...
1>LINK : fatal error LNK1104: cannot open file 'E:\Utality for Windows\crypto\cryptopp\Win32\Output\Debug\cryptlib.lib'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:27.22
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any solution?
So does that library exist?
E:\Utality for Windows\crypto\cryptopp\Win32\Output\Debug\cryptlib.lib
If not, then you need to build that library from the cryptopp sources (and I am sure it is more files than what your build log is showing).