evaleev / libint

Libint: high-performance library for computing Gaussian integrals in quantum mechanics
Other
218 stars 97 forks source link

Wrong compiler for fotran_example.F90 #226

Open SpinTensor opened 2 years ago

SpinTensor commented 2 years ago

the fortran_example.F90 in the fortran folder has the wrong compiler in the Makefile.in

fortran_example: fortran_example.o libint_f.o
        $(LTLINK) $(CXX) $(CXXFLAGS) $(LDFLAGS) $(COMPUTE_LIB) $(SYSLIBS) $(FCLIBS) -o $@ $^

Some compilers cannot use the c++ compiler for this. One manually needs to change it every time.

evaleev commented 2 years ago

@SpinTensor thanks for reporting this ... is the issue that $(FCLIBS) incomplete or that the fortran and c++ compilers are configured to use different linkers? There is no good reason why a C++ compiler would not be able to link in fortran runtime libs (FCLIBS is defined for this purpose ... perhaps its computation is broken).

SpinTensor commented 2 years ago

Not every compiler suite works like this. In some the fortran compiler is the most universal one and is used to link c++ code with the appropriate flags.