Closed insunaa closed 8 years ago
This is as it should be as prepackaged libraries on Linux are mostly compiled with g++, so the default compiler is used to avoid ABI incompatibilities. Additionally, parsing with libclang and compiling with g++ gives the warning and error capabilities of two compilers.
One can change the default compiler in preferences (cmake_command) if one wishes, and one can even create the build directories manually in case a project should have some specific cmake options added.
Alright then, I'll close the issue. :)
The default compiler in juCi++ is gcc/g++ (for some reason), while the parser uses clang. Clang and GCC have different levels of standards compliance which can very rarely lead to problems, for example this:
Is completely valid in clang, it compiles, outputting
Hello, World!
gcc on the other hand does not compile and throws these errors:
The problem here is that the code looks completely valid in the IDE, there are no error markers, etc.
Proposed fix: Give the user an option to set the preferred compiler from within the IDE and then generate this in the CMakeLists.txt
SET(CMAKE_CXX_COMPILER g++)
orSET(CMAKE_CXX_COMPILER clang++)
for example, depending on the user settings.