Comments (12)
Hi,
while clang 5 supports the flag -std=c++17, Apple's XCode's clang does not. If you have clang 5 installed via homebrew or similar, you might call XCode's clang instead. Please check Cevelop's preferences/C++/Build/Environment and examine the PATH environment variable. If your clang 5 is installed in /usr/local/bin, but PATH contains /usr/bin in the front, Cevelop will call XCode's Clang. Set the PATH environment variable within Cevelop to have the installation location of your Clang 5 in the front, then the option -std=c++17 should work.
Regards
Peter.
from issues.
Hi Peter, actually it didn't solve the issue. The PATH environment variable wasn't set up in Cevelop and I entered it accordingly to my clang 5.0 installation but the issue remains. In the command line the PATH is correct as can be seen from issuing a simple command:
Hackintosh:~ aacirino$ clang++ -v
clang version 5.0.0 (tags/RELEASE_500/final)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
from issues.
From the Cevelop UI you need to copy the PATH environment variable, even when it is not set directly and then set it to what you need. The settings in your shell are not influencing the settings in an app. Is your setting something like on the attached image?
I had similar problems in the past and I am sure that is a problem with your mac set up and not a bug in Cevelop.
What happens in your shell when you enter the command which clang++
?
from issues.
If Peter's suggestion does not help:
Could you try adding the "-v" option to the clang command within Cevelop? You should be able to insert into the miscellaneous options in the build settings, similar as you did for the -std=c++17 flags. It won't compile the files with that option anymore, but it will print the version on the build console. Does it print the same?
from issues.
To simplify the setting I only included the path to clang5.0 in Cevelop:
The path is the same for the command line:
Hackintosh:~ aacirino$ which clang++
/usr/local/opt/llvm/bin/clang++
Using the -v option shows that Cevelop is indeed invoking Apple's clang instead of using the one installed in the above PATH:
clang++ -I/usr/local/include -O0 -emit-llvm -g3 -Wall -c -fmessage-length=0 -v -std=c++17 -o Person.bc ../Person.cpp
Apple LLVM version 8.0.0 (clang-800.0.42.1)
from issues.
I was able to circumvent the issue by setting the LLVM Clang++
command and linker setting explicitly to /usr/local/opt/llvm/bin/clang++
from issues.
It is possible that Cevelop separately set the environment for the project. There are two locations to set the build environment:
- Preferences (globally for the workspace), accessed by Apple menu -> preferences
- Properties (specific settings for the project), accessed by right-click on the project -> properties
Have you set the PATH variable in the properties?
from issues.
Solved, in the project settings -> C/C++ Build -> Environment -> PATH the dir order was wrong. In the global preferences the PATH was correctly set, but not in the project settings.
Thanx a lot
from issues.
Great that it works now!
I think this might be a candidate for our FAQ.
from issues.
As a final note, I've just created a new project. In the global preferences my build environment variable PATH is correctly set and I selected the option to "Replace native environment with specified one". But Cevelop created the project with the PATH variable as appended with my global PATH:
global PATH : /usr/local/opt/llvm/bin/
project PATH : /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/llvm/bin/
Of course for the clang5.0 to be used by Cevelop I will need to edit the project PATH.
IMO this isn't the desired behavior.
from issues.
We'll look into this.
from issues.
This is an upstream issue, I've opened a new bug report here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=528891
from issues.
Related Issues (20)
- NPE in gslator HOT 1
- Plug-in com.cevelop.codeanalysator.core was unable to load class com.cevelop.codeanalysator.core.menu.TestHandler. HOT 1
- Arraystore exception (mit stacktrace) HOT 2
- Refactoring C-array into std::array uses incorrect size HOT 2
- Content Assist Not Making Suggestions HOT 1
- Cute test viewer should navigate also to successful tests.
- Alert no main class on first startup HOT 12
- Properties menu item is gone HOT 6
- Warning "Return statement has invalid style. Return value should be surrounded by parenthesis" HOT 1
- how to get rid off "Un- or ill-initialized variable" HOT 2
- [Cevelop] Can't update packages HOT 1
- Menu display issues at high DPI
- Cevelope crash if I install plugin C/C++ Unit testing feature HOT 10
- "Save Failed" HOT 1
- Eclipse Marketplace issue HOT 2
- Linticator won't run HOT 1
- Error trying to run Linticator in MCUXpresso HOT 9
- could not create the java virtual machine
- TDD refactorings broken: create local variable throws HOT 1
- Cevelop blows up at startup HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from issues.