我正在尝试编译一个合并Matlab和Fortran的复杂程序,我得到了错误
ipo: warning #11021: unresolved runpoissonsolver_
Referenced in /tmp/ipo_ifort73gcto.o
ipo: warning #11021: unresolved setuppoissonsolver_
Referenced in /tmp/ipo_ifort73gcto.o
ipo: warning #11021: unresolved utFree
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libeng.so
ipo: warning #11021: unresolved matCreateMATFile
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libeng.so
ipo: warning #11021: unresolved utCalloc
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libeng.so
ipo: warning #11021: unresolved matGetNextVariable
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libeng.so
ipo: warning #11021: unresolved matClose
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libeng.so
ipo: warning #11021: unresolved utF2cstr
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libeng.so
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libmx.so
ipo: warning #11021: unresolved matPutNextVariable
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libeng.so
ipo: warning #11021: unresolved ucnv_getNextUChar_52
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libmx.so
ipo: warning #11021: unresolved _ZN5boost6detail25get_once_per_thread_epochEv
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libmx.so
ipo: warning #11021: unresolved _ZN2fl4i18n8MwLocale6globalEv
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libmx.so
ipo: warning #11021: unresolved _ZN6MATLAB14getReshapeDims10unknownDimC1Ev
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libmx.so
ipo: warning #11021: unresolved _ZTVN2fl6except6detail14bad_alloc_impl8internalE
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libmx.so
ipo: warning #11021: unresolved utSetLastWarningMsg
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libmx.so
ipo: warning #11021: unresolved _ZN6MATLAB15legacy_two_part11noformat_mxC1Ev
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libmx.so
ipo: warning #11021: unresolved enc_to_utf16_n
Referenced in /afs/crc.nd.edu/x86_64_linux/matlab/8.5/bin/glnxa64//libmx.so
....
....
....
这还有几百行错误。以下是我用来编译的命令。
#!/bin/tcsh
set FC=ifort
module switch matlab matlab/8.5
set matlabroot=/afs/crc.nd.edu/x86_64_linux/matlab/8.5
set PATH = ($PATH "$matlabroot/bin/glnxa64/")
set PATH = ($PATH "$matlabroot/bin")
set LD_LIBRARY_PATH = ( $LD_LIBRARY_PATH "$matlabroot/bin/glnxa64/")
set LD_LIBRARY_PATH = ( $LD_LIBRARY_PATH "$matlabroot/sys/os/glnxa64/")
${FC} Constants.f90 PRNG.f90 NonElementaryFunctions.f90 Calculus.f90 InputFile.f90 ElectrodeGeometry.f90 ExtraFunctions.f90 CustomClasses.f90 GlobalVars.f90 Transformations.f90 StatisticalDistribution.f90 StatisticalMechanics.f90 PoissonSolver.f90 ParticleInCell.f90 MonteCarloCollision.f90 Emission.f90 ElectricalSystem.f90 NDPIC1D.f90 -I${matlabroot}/extern/include/ -L${matlabroot}/bin/glnxa64/ -leng -lmx -fpp -i8 -autodouble -check bounds -check pointers -check uninit -heap-arrays -o FEngDemo -O3 -fast -L/usr/lib/x86_64-redhat-linux5E/lib64/
编辑2016-01-04 19:42 GMT:
回应评论
@High Performance Mark
你是对的。最后,我在标志ld: cannot find -leng
上收到错误。但是,当我在Matlab的示例文件上运行时,这是有效的。
@john elemans
请参阅ls
ls
archive ElectricalSystem.f90 InputFile.f90 ParticleInCell.f90 StatisticalDistribution.f90
Calculus.f90 ElectrodeGeometry.f90 Iterative_Solvers.f90 pdetfxpd.m StatisticalMechanics.f90
compile.tcsh Emission.f90 makefile **PoissonSolver.f90** Transformations.f90
Constants.f90 ExtraFunctions.f90 MonteCarloCollision.f90 PRNG.f90
CustomClasses.f90 GlobalVars.f90 NDPIC1D.f90 RightHandSide.m
DataSubmit.job Initialize_Poisson2D.m NonElementaryFunctions.f90 Run_Poisson2D.m