dotBunny / CLionSourceCodeAccess

A CLion Plugin for Unreal Engine
138 stars 26 forks source link

ue4.20 build on windows with VS17 #101

Open DantaliaN00 opened 6 years ago

DantaliaN00 commented 6 years ago

Im trying to build new empty c++ project with clion and get this error

"C:\Program Files\JetBrains\CLion 2018.1.5\bin\cmake\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - NMake Makefiles" F:\FFF\TEST\UEv420p5
-- The C compiler identification is MSVC 19.14.26431.0
-- The CXX compiler identification is MSVC 19.14.26431.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: F:/FFF/TEST/UEv420p5/cmake-build-debug

Cannot get compiler information:
    Compiler exited with error code 2: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\Hostx86\x86\cl.exe"

...

out
    ENC_CWD=F:\FFF\TEST\UEv420p5\cmake-build-debug
    ENC_CL=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\Hostx86\x86\cl.exe
    ENC_SRC=out
    ENC_PDB=F:\FFF\TEST\UEv420p5\cmake-build-debug\vc140.pdb

...

Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\8.1\include\shared" -I"C:\Program Files (x86)\Windows Kits\8.1\include\um" -I"C:\Program Files (x86)\Windows Kits\8.1\include\winrt" -I"C:\Program Files (x86)\Windows Kits\8.1\include\cppwinrt" -X
    cl : Command line error D8049 : cannot execute 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\Hostx86\x86\c1xx.dll': command line is too long to fit in debug record

[Failed to reload]

Why this happens?

Changing architecture to x64 did not help

antonlind commented 5 years ago

I'm having the same issue, I posted on the UE answerhub about it since this plugin is now part of unreal engine & I don't think the repo is active anymore. Maybe you can let me know if you find a solution? https://answers.unrealengine.com/questions/811610/clion-with-ue-420-command-line-error-d8049.html

S-Marais commented 5 years ago

just change the Build Type from Debug to Release and you should have everything running

M-Pixel commented 4 years ago

just change the Build Type from Debug to Release

How is this accomplished? I don't see any way to do that in clion:

image

Alternately, how I can get it to use Visual Studio 2019 instead of 2017 when both are present?

S-Marais commented 4 years ago

that's in Settings [Ctrl+Alt+S] -> Build,Execution,Deployment -> CMake