Skip to content

Cannot Compile C code with Intel #426

@everythingfunctional

Description

@everythingfunctional

The current method of allowing C code in a project does not allow compiling with the Intel compilers. Other compilers (I've tried gfortran, nagfor and nvfortran) recognize the .c extension and just work, although I do get the following warning from gfortran:

cc1: warning: command-line option ‘-Wimplicit-interface’ is valid for Fortran but not for C
cc1: warning: command-line option ‘-fcheck=bounds’ is valid for Fortran but not for C
cc1: warning: command-line option ‘-fcheck=array-temps’ is valid for Fortran but not for C
cc1: warning: command-line option ‘-fbacktrace’ is valid for Fortran but not for C
cc1: warning: command-line option ‘-fcoarray=single’ is valid for Fortran but not for C

But the Intel compilers (both ifort and ifx), issue the following message, and do not compile the C code.

ifort: warning #10145: no action performed for file './src/say_hello.c'

I'm guessing one must explicitly compile C code with icc (or icx) in order to mix C and Fortran with Intel.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmediumDifficulty level is medium

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions