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

mixed programming c and fortran Intel 11.1

melco2010
Beginner
264 Views
I have downloaded an evaluation version of 11.1 icc and ifort.
I tried to use it to comiple main.c which calls some fortran subcode *.F . It was fine when I used Intel 8.0 to compile them using ipo link option. But, when I use 11.1 to do the same thing, the link process stopped:
ipo: warning #11020 : unresolved AAA_
Referenced in /tmp/opo_icce8LP1S.o
in Funtion 'BBB_.':
ipo_out.c: ( ) : undefined reference to 'AAA_'
make: *** [codename] error 1

What is wrong ? Do I need to change the code for 11.1 ?

Looking forward to our help.
0 Kudos
2 Replies
TimP
Honored Contributor III
264 Views

If you have recompiled all source code with the same compiler version, what worked between ifort 8 and icc 8 should work also with the new version. ipo requires both the C and Fortran used for all objects to have identical versions.

ifort 8 didn't support iso_c_binding, which is the standard way to avoid non-portable interfacing between C and Fortran.

0 Kudos
melco2010
Beginner
264 Views

Thanks for your help.

I did recompile all source codes to get the posted error message by "deleting *.o" before run the

make file. And I am using 11.1 for both icc and ifort.

Can you give me more instructions ? or Should I disclose more details ?

Thank you in advance.

regards

0 Kudos
Reply