[Scons-users] How do I compile F90?

罗飞 geoluo1217 at gmail.com
Fri Apr 10 04:36:38 EDT 2015


Dear developer,
>
>       I am learning scons. But,I happened a problem.Please see the
> screenshot:

         This is my SConstruct:
====================================================================
  1 import os
  2
env=Environment(F90='/home/apps/intel/composer_xe_2013_sp1.0.080/bin/intel64/ifort')
  3 Export('env')
  4 SConscript('dir/SConscript')
  5 env.Object('helloscons.f90')
  6 env.Program('234',['dir/say.o','helloscons.o'])
====================================================================
        scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
/home/apps/intel/composer_xe_2013_sp1.0.080/bin/intel64/ifort -o dir/say.o
-c dir/say.f90
/home/apps/intel/composer_xe_2013_sp1.0.080/bin/intel64/ifort -o
helloscons.o -c helloscons.f90
gfortran -o 234 dir/say.o helloscons.o
dir/say.o: In function `hello_mp_say_':
dir/say.f90:(.text+0x4e): undefined reference to `for_write_seq_lis'
helloscons.o: In function `MAIN__':
helloscons.f90:(.text+0x1f): undefined reference to
`__intel_new_feature_proc_init'
helloscons.f90:(.text+0x38): undefined reference to `for_set_reentrancy'
collect2: ld returned 1 exit status
scons: *** [234] Error 1
scons: building terminated because of errors.
=====================================================================
      You can see it used ifort to compile *.f90,but it used gfortran to
link *.o.
      Why?
      Can you tell me how I make scons link *.o by ifort?


Thanks!
Fei Luo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150410/be781250/attachment.html>


More information about the Scons-users mailing list