[erlang-questions] rebar: how to set which C compiler to use

Ivan Uemlianin ivan@REDACTED
Thu Sep 3 15:15:26 CEST 2015

Dear All

I have downloaded an erlang project which includes some C files, and 
which uses rebar as a build tool.  I'd like to explicitly set which 
compiler rebar uses to compile the C files.  Is this possible in the 

Some details:

- ./rebar compile returns a load of C compiler errors
- adding CFLAGS and LDFLAGS helps a bit
- Compiling C files individually I notice different C compilers have 
very different results.  The platform this is all on "cc" is gcc 4.1, 
while "gcc" (which gets best results) is gcc 4.8.
- rebar seems to be using "cc" (judging by the errors).
- Setting a CC environment variable seems not to have any effect.

With thanks and best wishes


Ivan A. Uemlianin PhD
Speech Technology Research and Development


                         festina lente

More information about the erlang-questions mailing list