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

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

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.

AttachmentSize
Downloadapplication/zip mixed-cf.zip2.11 MB
3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.

yes...I got it. thanks.

Leave a Comment

Please sign in to add a comment. Not a member? Join today