Can EiffelStudio use gcc?

57 views
Skip to first unread message

Jimmy Johnson

unread,
May 9, 2025, 6:12:07 PMMay 9
to Eiffel Users
I have an late 2013 (i.e. old) iMac.  At seems ES uses clang, which in my case will not handle c++17 constructs for externals.  I installed gcc14 via MacPorts, but executing "gcc" or "gcc --version" calls clang.

Is there a way to make ES use gcc instead of clang, and/or can I get xCode (on Catalina) to use the newer version of gcc?
jjj

Ulrich Windl

unread,
May 10, 2025, 3:44:13 PMMay 10
to eiffel...@googlegroups.com
According to https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html
you might try option -B

Ulrich

Jimmy Johnson

unread,
May 11, 2025, 10:58:24 PMMay 11
to Eiffel Users
Okay, how do I make EiffelStudio (GUI version) do that?

Jocelyn Fiat

unread,
May 12, 2025, 2:52:08 AMMay 12
to eiffel...@googlegroups.com
Hi,

Check the $ISE_EIFFEL/studio/spec/$ISE_PLATFORM/include/config.sh
You can either edit this file to customize it.
Or you can also set the CFLAGS environment variable (by default it is set by the compiler to  '-pipe -fno-common -fPIC'


--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/eiffel-users/d42f7231-eda8-4a86-bb6e-a56d70a68b64n%40googlegroups.com.


--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

Jimmy Johnson

unread,
May 14, 2025, 2:51:22 PMMay 14
to Eiffel Users
Thanks Jocelyn for a direct answer to the question, but I would not know how to customize that file.  I use Eiffel so that I don't have to do such stuff.

Anyway, I now don't think I need that, because I got a C++17 project to compile in Xcode.  So, I guess I need to pass a flag to the compiler (which I think is clang) to tell the compiler to use C++17 options.
How do I set this flag in EiffelStudio?  Is it in the "project settings"?  ecf file?

If it is set with an environment variable (e.g. CFLAGS?) instead, that will change all projects, right?  Is there any harm in setting it for all projects?
thanks,
jjj

rfo amalasoft.com

unread,
May 14, 2025, 2:58:12 PMMay 14
to eiffel...@googlegroups.com
Hi Jimmy
Have a look at your project settings,, from estudio, under "Externals" 
Roger

From: eiffel...@googlegroups.com <eiffel...@googlegroups.com> on behalf of Jimmy Johnson <eiffe...@gmail.com>
Sent: Wednesday, May 14, 2025 2:51 PM
To: Eiffel Users <eiffel...@googlegroups.com>
Subject: Re: [eiffel-users] Can EiffelStudio use gcc?
 

Jimmy Johnson

unread,
May 14, 2025, 3:13:36 PMMay 14
to Eiffel Users
Did that.  I don't see anything useful here.

But, let me try a newer version of EiffelStudio where the  externals settings might work more consistently.

rfo amalasoft.com

unread,
May 14, 2025, 3:29:23 PMMay 14
to eiffel...@googlegroups.com
Did you try right clicking on the Externals item?  It's not as obvious as it should be.
R



Sent: Wednesday, May 14, 2025 3:13 PM
es_ext.png

Jimmy Johnson

unread,
May 14, 2025, 3:36:10 PMMay 14
to Eiffel Users
Which one?  I don't see anything related to a compiler flag, saying use C++17.

rfo amalasoft.com

unread,
May 14, 2025, 3:48:43 PMMay 14
to eiffel...@googlegroups.com
Yup, you're right about that.  You can set flags and such, and you can use env vars within those settings, but the choice of C compiler comes from elsewhere.  You can edit the Makefile.SH I suppose, but it gets clobbered.
You might try setting a flag for what appears in the Makefile.SH, to override a default.
CC = $cc
CPP = $cpp

R


Sent: Wednesday, May 14, 2025 3:36 PM

Jimmy Johnson

unread,
May 14, 2025, 4:04:37 PMMay 14
to Eiffel Users
That was my original question.  Now I don't want to change compilers, because clang will accept C++17 options if it is told to.  I just don't know how to pass that flag from EiffelStudio to the external compilation.
jjj

rfo amalasoft.com

unread,
May 15, 2025, 8:14:09 AMMay 15
to eiffel...@googlegroups.com
Hi Jimmy
I'm just wondering if the image I attached to my earlier response (about right-clicking on the Externals menu) made it to you.  It seems to show "Add C flag" clearly.  Isn't that what you're looking to do?
R

Sent: Wednesday, May 14, 2025 4:04 PM
es_ext.png

Jimmy Johnson

unread,
May 15, 2025, 12:40:26 PMMay 15
to Eiffel Users
Yes!  Thanks.  But I had to right-click-and-hold.  The menu disappeared on button release, so I was not seeing the context menu which I just found by accident thanks to your persistence.

Now I get multiple "error:  invalid argument '-std=c++17' not allowed with 'C' " errors during external compilation.  So now to figure out why.

Thanks again,
jjj

Reply all
Reply to author
Forward
0 new messages