Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29295 Discussions

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

farzin_p_
Beginner
518 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
518 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
518 Views

yes...I got it. thanks.

0 Kudos
Reply