Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29389 Discussions

how to mix fortran and C (not C++) in visual studio 2010 ?

farzin_p_
Beginner
661 Views

Dear all,

In attached solution, when the extension of C code file is "*.cpp", the mixed C++/F program can be compiled succesfully.  But, when it has a "*.c" extension, it gives a syntax error. How could fix this problem? My C code files all have the "*.c" extension? any idea?

Thanks.

0 Kudos
2 Replies
IanH
Honored Contributor III
661 Views

C++ and C have much in common, but they are still different languages.  The extern "C" linkage specification in your C++ code isn't valid C.

0 Kudos
farzin_p_
Beginner
661 Views

yes...I got it. thanks.

0 Kudos
Reply