dotBunny / CLionSourceCodeAccess

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

/bin/sh: -c: line 0: syntax error near unexpected token `(' #47

Open gardenvarietyse opened 7 years ago

gardenvarietyse commented 7 years ago

I'm getting the error in the subject when trying to compile my project. It seems to happen because the compiler is passed the option -g ( ). I'm not well versed enough in CMake/gcc/etc though to figure out why this happens.

In flags.make belonging to the project with the issue, I see:

 # compile CXX with /usr/bin/c++.exe
 CXX_FLAGS = -g   ( ) -std=gnu++11

but in CMakeCache.txt, there's only CMAKE_CXX_FLAGS_DEBUG:STRING=-g. I can't figure out where this ( ) is coming from.

Could anyone pinpoint the right place to look?

gardenvarietyse commented 7 years ago

Actually, when cmake generates the scripts, it also outputs the following. Maybe it's related?

CMake Error: RelativePath must be passed a full path to remote: C:/Users/steve/code/ue/steveshooty/Intermediate/ProjectFiles/IncludeDirectories.cmake
CMake Error: RelativePath must be passed a full path to remote: C:/Users/steve/code/ue/steveshooty/Intermediate/ProjectFiles/Definitions.cmake
CMake Error: RelativePath must be passed a full path to remote: C:/Users/steve/code/ue/steveshooty/Intermediate/ProjectFiles/UE4Editor.cmake
CMake Error: RelativePath must be passed a full path to remote: C:/Users/steve/code/ue/steveshooty/Intermediate/ProjectFiles/UE4Game.cmake
CMake Error: RelativePath must be passed a full path to remote: C:/Users/steve/code/ue/steveshooty/Intermediate/ProjectFiles/steveshooty.cmake
CMake Error: RelativePath must be passed a full path to remote: C:/Users/steve/code/ue/steveshooty/Intermediate/ProjectFiles/steveshootyEditor.cmake
reapazor commented 7 years ago

This sounds like its related to something ive been meaning to look at :) the slashes on windows, and filtering/swapping them from the generated projects in unreal.

gardenvarietyse commented 7 years ago

Maybe. Forward slashes should work fine on Windows though..

gardenvarietyse commented 7 years ago

After fixing that (manually), I still have trouble with the engine includes (reported elsewhere). But I see that the includes in flags.make look like this (for example):

/cygdrive/c/Users/steve/code/ue/steveshooty/C:/Program Files (x86)/Epic Games/4.14/Engine/Source/Runtime/Engine/Public

first it has the base /cygdrive/c path which will point to the root of C:, but then it has my own project's entire path immediately followed by the Windows-style path to the include folder, which of course doesn't make sense. I'll try modifying all these includes manually and see if that helps.

Maybe this include path issue is related to the RelativePath one also.

reapazor commented 7 years ago

@gardenvarietyse did this resolve when you manually changed them? Ie should we forcibly make the change in code?

We use the paths in CodeLite projects, generated by UE, and then UE's FPath API point to manipulate. Might be useful just to switch ALL paths to \ on windows before the paths are written out ...

gardenvarietyse commented 7 years ago

Actually, I can't compile it still, since there doesn't seem to be any cygwin support .. so I gave up on that for now

reapazor commented 7 years ago

:| got unreal downloading on windows :) ... gonna solve this :)

VenyaG commented 6 years ago

@gardenvarietyse I fix this errors by replacing to relative path from: C:/Users/steve/code/ue/steveshooty/Intermediate/ProjectFiles/IncludeDirectories.cmake to: Intermediate/ProjectFiles/IncludeDirectories.cmake

Errors gone, but i dont know is this a right solution