摘要: Example 3: Main Program in FORTRAN, with Subroutines in C, C++, and FortranThough the non-FORTRAN subroutines don't have any underscores after their names in the main FORTRAN program, running the nm command on fprogram.o shows that the FORTRAN program expects that they'll have underscores ap 阅读全文
posted @ 2011-07-09 22:17 greencolor 阅读(220) 评论(0) 推荐(0) 编辑
摘要: Example 1: Main Program in C, with Subroutines in C, C++, and FORTRANThe C program is nothing out of the ordinary: it defines two variables, and calls various functions that change those variables' values. C requires that we use a "call by reference" syntax to make these changes persis 阅读全文
posted @ 2011-07-09 21:33 greencolor 阅读(238) 评论(0) 推荐(0) 编辑
摘要: undefined reference to '__gxx_personality_v0'编译 c++ 程序需要添加 -lstdc++ option. sample: gcc -lstdc++ -o test test.c,否则会报 "undefined reference to '__gxx_personality_v0' " 错误 或者用g++也可以 阅读全文
posted @ 2011-07-09 21:31 greencolor 阅读(269) 评论(0) 推荐(0) 编辑
摘要: c00000000111111111122222222223333333333444444444455555555556666666666777c23456789012345678901234567890123456789012345678901234567890123456789012 program function1c --- declaration of variables real x, yc --- show function print*,"==========================================" print*,"Cal 阅读全文
posted @ 2011-07-09 10:59 greencolor 阅读(195) 评论(0) 推荐(0) 编辑