Hi all!
I'm running a complex model written in two sections (one in fortran and the other in c++), compiled together by using a makefile. I was able to compile it in a linux system on a PC, using the intel compilers. We are a few people working with the same model, and it's quite usual to have compilation problems due to system differences.
Now I'm trying to compile it in a Mac Pro, using the GNU compilers, and I was able to go beyond some of the problems, but I'm stucked with the last one.
I copy it here:
dyn1003-29:Macvs1-fromHPvs2 mmartinc$ make
gfortran -o motif_lpj lpjmain_std.obj lpjio-std.obj Array.obj -I/Users/mmartinc/local/lib/lnetcdf_c++ -I/Users/mmartinc/local/lib/-lnetcdf
ld: warning: in lpjio-std.obj, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in Array.obj, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
"_getgrid_", referenced from:
_MAIN__ in lpjmain_std.obj
_MAIN__ in lpjmain_std.obj
"_outgrid_", referenced from:
_MAIN__ in lpjmain_std.obj
"_outannual_", referenced from:
_MAIN__ in lpjmain_std.obj
"_termio_", referenced from:
_MAIN__ in lpjmain_std.obj
"_getclimate_", referenced from:
_MAIN__ in lpjmain_std.obj
_MAIN__ in lpjmain_std.obj
"_initio_", referenced from:
_MAIN__ in lpjmain_std.obj
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [motif_lpj] Error 1
dyn1003-29:Macvs1-fromHPvs2 mmartinc$
lpjmain_std.obj is one of the obj files created during the compilation, but I don't know where is the problem coming from...I'm sorry if it's too basic, but I'm still a newbie
Any help will be more than welcome
Thanks in advance!!
I'm running a complex model written in two sections (one in fortran and the other in c++), compiled together by using a makefile. I was able to compile it in a linux system on a PC, using the intel compilers. We are a few people working with the same model, and it's quite usual to have compilation problems due to system differences.
Now I'm trying to compile it in a Mac Pro, using the GNU compilers, and I was able to go beyond some of the problems, but I'm stucked with the last one.
I copy it here:
dyn1003-29:Macvs1-fromHPvs2 mmartinc$ make
gfortran -o motif_lpj lpjmain_std.obj lpjio-std.obj Array.obj -I/Users/mmartinc/local/lib/lnetcdf_c++ -I/Users/mmartinc/local/lib/-lnetcdf
ld: warning: in lpjio-std.obj, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: in Array.obj, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
"_getgrid_", referenced from:
_MAIN__ in lpjmain_std.obj
_MAIN__ in lpjmain_std.obj
"_outgrid_", referenced from:
_MAIN__ in lpjmain_std.obj
"_outannual_", referenced from:
_MAIN__ in lpjmain_std.obj
"_termio_", referenced from:
_MAIN__ in lpjmain_std.obj
"_getclimate_", referenced from:
_MAIN__ in lpjmain_std.obj
_MAIN__ in lpjmain_std.obj
"_initio_", referenced from:
_MAIN__ in lpjmain_std.obj
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [motif_lpj] Error 1
dyn1003-29:Macvs1-fromHPvs2 mmartinc$
lpjmain_std.obj is one of the obj files created during the compilation, but I don't know where is the problem coming from...I'm sorry if it's too basic, but I'm still a newbie
Any help will be more than welcome
Thanks in advance!!