error: command 'C:\\ Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.
26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
There doesn't seem to be a valid solution for this error but one workaround is to install the windows binary package from https://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap
CSFML with VS Code and MSVC cl.exe LNK2019 error
So after many hours of trying to work it out and googling and stackoverflow and discord servers I finally managed to figure it out...
I found the correct commandline args and order but kept having issues as it wouldn't compile for 64 bit but would for x86/32 bit
Since I'm using MSVC the you have to launch VS Code using "Developer Command Prompt for VS 2019" and well turns out that that defaults to an x86 build environment which isn't said in any of the documentation but if u open "x64 Native Tools Command Prompt for VS 2019" instead and open code using that it works using the following tasks.json:
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: cl.exe build active file",
"command": "cl.exe",
"args": [
"/Zi",
"/EHsc",
"/I${fileDirname}/CSFML-2.5-windows-64-bit/include",
"${fileDirname}\\CSFML-2.5-windows-64-bit\\lib\\msvc\\csfml-graphics.lib",
"${file}",
"/link",
"/MACHINE:x64",
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$msCompile"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
Cl.exe returing error code D8050
I had this issue with a cleared environment, and it was resolved (at least in part) by setting the TMP environment variable.
Related Topics
Convert Shared Library to Static Library
Where Does the -Dndebug Normally Come From
How to Generate Type Library from Unmanaged Com Dll
Assert That Code Does Not Compile
Using Custom Camera in Opencv (Via Gstreamer)
Specialization of Member Function Template After Instantiation Error, and Order of Member Functions
How to Benchmark Boost Spirit Parser
What Happens to the Memory Allocated by 'New' If the Constructor Throws
Why Are C++ Int and Long Types Both 4 Bytes
Duplicate Const Qualifier Allowed in C But Not in C++
Quadruple Precision in C++ (Gcc)
Get Key Press in Windows Console
How to Handle a Ctrl-Break Signal in a Command Line Interface