libint icon indicating copy to clipboard operation
libint copied to clipboard

Wrong compiler for fotran_example.F90

Open SpinTensor opened this issue 3 years ago • 2 comments

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.

SpinTensor avatar Oct 28 '21 06:10 SpinTensor

@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).

evaleev avatar Jan 13 '22 00:01 evaleev

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.

SpinTensor avatar Feb 02 '22 20:02 SpinTensor