【发布时间】:2019-03-02 02:26:15
【问题描述】:
我有主程序Engine.f 调用LIB.f 中的函数/外部。
与 C++ 和 Java 不同,主程序中没有包含,因此可以编译。
我的 Fortran 编译器如何知道我正在使用另一个库?
我正在使用来自 Eclipse 的 photran。
MAKE 文件:
.PHONY: all clean
# Change this line if you are using a different Fortran compiler
FORTRAN_COMPILER = gfortran
all: src/Engine.f
$(FORTRAN_COMPILER) -O2 -g \
-o bin/Engine.exe \
src/Engine.f
clean:
rm -f bin/Engine.exe *.mod
我在编译时遇到的错误:
undefined reference to (name of function in **LIB.f**)
【问题讨论】:
标签: makefile compilation fortran dependencies