Cevelop / Issues

The official issue tracker for Cevelop.
9 stars 1 forks source link

Properties menu item is gone #116

Closed VictorEijkhout closed 4 years ago

VictorEijkhout commented 4 years ago

I had a code where the #include <optional> was unresolved, so I thought I'd replace g++ by clang++. I somehow managed to do taht, but now even #include <iostream> is unresolved, so I want to go back.

Where do I specify the compiler?

I sort of suspect that that's under File > Properties, but that dialog refuses to come up. I've restarted the Cevelop program and done "reset perspective", but nothing helps. Reboot next?

PeterSommerlad commented 4 years ago

If you are on a mac, make sure to have the XCode command line tools installed (search for that on the internet on how to do it).

Then create a "Hello World" C++ project using the project wizard and see if that compiles and runs.

If not, then your C++compilation infrastructure is insufficient.

If you use homebrew, you might need to add /usr/local/bin to the runnnig Cevelop's Environment through the global preferences...

VictorEijkhout commented 4 years ago

On Nov 7, 2019, at 11:30 AM, Peter Sommerlad notifications@github.com<mailto:notifications@github.com> wrote:

Then create a "Hello World" C++ project using the project wizard and see if that compiles and runs.

I used the default GCC toolchain, and according to the console it invokes clang++

  1. It’s very annoying that the console wipes itself, so I have to pay close attention and I can not cut&paste you the evidence. Trust me: it is using the wrong compiler.
  2. How can I change the compiler back? I think I did that through File > Properties, but that menu refuses to come up. How can I reset that?

Victor.

tcorbat commented 4 years ago
  1. The build console is probably not wiped, but hidden by the output console. You can cycle through the consoles using the "Terminal" icon in the console view. If you don't want the consoles to switch on output you can toggle the corresponding buttons: grafik

  2. There should be a File -> Properties entry. I don't know why this menu entry could vanish and have never experienced Eclipse CDT removing it by itself. However, you can customize your perspective. Window -> Perspective -> Customize Perspective.... In the Menu Visibility tab, you can tick the properties entry:

grafik

In the properties of your project you can configure the compiler command: Properties -> C/C++ Build -> Settings -> Tool Settings (Tab) -> GCC C++ Compiler -> Command:

grafik

PeterSommerlad commented 4 years ago

I used the default GCC toolchain, and according to the console it invokes clang++

If you are on a mac and just have XCode and its command line tools install, it comes with clang that disguises as gcc, i.e., it is callable as g++ while still being clang. So selecting the GCC toolchain will give you the clang compiler regardless.

If you use homebrew to install gcc under /usr/local/bin, you have to go to the Top-level menu Cevelop C++ IDE->Preferences->C/C++->Build->Environment and Select... the PATH environment variable and adjust it to have /usr/local/bin before all other paths:

Screenshot 2019-11-08 at 11 24 15

With that the GCC toolchain actually uses gcc. Sorry for confusing you by saying "properties" and not being clear but I was on the phone and not my computer when replying. You can also set that environment project specific by using the C++ project's properties.

VictorEijkhout commented 4 years ago

On Nov 8, 2019, at 4:27 AM, Peter Sommerlad notifications@github.com<mailto:notifications@github.com> wrote:

If you are on a mac and just have XCode and its command line tools install, it comes with clang that disguises as gcc, i.e., it is callable as g++ while still being clang. So selecting the GCC toolchain will give you the clang compiler regardless.

Let’s get this hashed out.

No. The console explicitly says “clang++”. That’s because I made a change, but I can’t find where I did this.

Victor.

VictorEijkhout commented 4 years ago

Never mind. I’m giving up on this. I can’t even get a file compiled.

On Nov 8, 2019, at 4:27 AM, Peter Sommerlad notifications@github.com<mailto:notifications@github.com> wrote:

I used the default GCC toolchain, and according to the console it invokes clang++

If you are on a mac and just have XCode and its command line tools install, it comes with clang that disguises as gcc, i.e., it is callable as g++ while still being clang. So selecting the GCC toolchain will give you the clang compiler regardless.

If you use homebrew to install gcc under /usr/local/bin, you have to go to the Top-level menu Cevelop C++ IDE->Preferences->C/C++->Build->Environment and Select... the PATH environment variable and adjust it to have /usr/local/bin before all other paths:

[Screenshot 2019-11-08 at 11 24 15]https://user-images.githubusercontent.com/1725845/68469438-772c0400-021a-11ea-9f98-8d34cd4babb1.png

With that the GCC toolchain actually uses gcc. Sorry for confusing you by saying "properties" and not being clear but I was on the phone and not my computer when replying. You can also set that environment project specific by using the C++ project's properties.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Cevelop/Issues/issues/116?email_source=notifications&email_token=AAFHBAX2N3ZPQFUFB2VGEBLQSU5HNA5CNFSM4JKKP3JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDP34OI#issuecomment-551534137, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAFHBAX6FY3DCF7FXXTNSATQSU5HNANCNFSM4JKKP3JA.

This message is from an external sender. Learn more about why this matters.https://ut.service-now.com/sp?id=kb_article&number=KB0011401