我遇到了这个错误:
mpif90 -o /Users/manfredo/Desktop/ED2/ED/build/ed_2.1-opt edmain.o -L/opt/local/lib/libgcc/ -lstdc++ -I/Users/manfredo/Desktop/ED2/ED/src/include -I/opt/local/include /Users/manfredo/Desktop/ED2/ED/build/ed_2.1-opt.a -lm -lz -L/opt/local/lib -lhdf5 -lhdf5_fortran
Undefined symbols for architecture x86_64:
"_calchydrosubsurface_", referenced from:
_ed_model_ in ed_2.1-opt.a(ed_model.o)
...
other similar errors
...
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[1]: *** [/Users/manfredo/Desktop/ED2/ED/build/ed_2.1-opt] Error 1
make: *** [all] Error 2
我已尝试添加-stdlib=libstdc++
或包含库lstdc ++或lstc ++。6,如建议的here或here,我已经发布了question有关相同错误的信息但是仍然无法修复它。
需要使用mpif进行编译。任何帮助将不胜感激。