Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Compilation problems

roboa1983
Beginner
295 Views
Hi
I haven't been able to figure out this compilation problem. I have the impression that I'm not linking stuff the right way, but maybe there's something else more trivial to it (although an initial search proved fruitless)

icpc -I/home/home/include -DONEEXE -DLINUX -DLINUX_Ix86 -DGCC30 -DQCHEM -DGNUXX -DINTS_TIMING -DXC_TIMING -DGCC30 -DNO_STL atogrd.F atogrd.f
ld:atogrd.F: file format not recognized; treating as linker script
ld:atogrd.F:1: syntax error

Thanks!
0 Kudos
3 Replies
dpeterc
Beginner
295 Views
Maybe you are trying to compile Fortran code with C/C++ compiler?
0 Kudos
Kevin_D_Intel
Employee
295 Views

Appears to be more like trying to preprocess Fortran (.F) source and produce a resulting (.f) source. I have seen /lib/cpp used for this.

0 Kudos
TimP
Honored Contributor III
295 Views
This does look like an accident which might be caused by an attempt to substitute icpc for a gnu compiler. gcc could invoke Fortran implicitly, with .F signifying pre-processing by gnu tradcpp. This doesn't explain everything, because the .F and .f compilations would conflict by defaulting to the same named .o file. The usual convention is that .F includes # pre-processing lines, and .f is a Fortran source not requiring pre-processing.
Intel Fortran includes a built-in pre-processor, which usually permits pre-processing and compilation consistent with gnu Fortran, but you must install Fortran and invoke it explicitly in the command line.
The usual way of using gcc to perform separate pre-processing for Fortran:
gcc -traditional -E -x c source.fpp > source.f
0 Kudos
Reply