incompatible impicit declararion

Hello,

I get the warning message below when compling the WRF/CHEM.
But executable files were maded in the directories.

sym.c:77: incompatible implicit declaration of built-in function ‘exit’

what is meaning of the warning messages and how to solved…

Second,

I get the error message when compling the WRF/CHEM.

./compile emi_conv

pgf90 -o convert_emiss.exe -fastsse -Mvect=noaltcode -Msmartalloc
-Mprefetch=distance:8 -Mfprelaxed -w -Mfree -byteswapio

convert_emiss.o …/main/libwrflib.a /home/lim/WRFCHEM/WRFV3/external/fftpack/fftpack5/libfftpack.a
/home/lim/WRFCHEM/WRFV3/external/io_grib1/libio_grib1.a
/home/lim/WRFCHEM/WRFV3/external/io_grib_share/libio_grib_share.a
/home/lim/WRFCHEM/WRFV3/external/io_int/libwrfio_int.a
/home/lim/WRFCHEM/WRFV3/external/esmf_time_f90/libesmf_time.a
/home/lim/WRFCHEM/WRFV3/external/RSL_LITE/librsl_lite.a
/home/lim/WRFCHEM/WRFV3/frame/module_internal_header_util.o
/home/lim/WRFCHEM/WRFV3/frame/pack_utils.o
/home/lim/WRFCHEM/WRFV3/WRFV3/external/io_netcdf/libwrfio_nf.a
-L/opt/lib.pgi/NETCDF4/lib -lnetcdff -lnetcdf


convert_emiss.o: In function .STATICS1': convert_emiss.f90:(.data+0x1384): undefined reference to module_initialize_real_’
make[1]: [convert_emiss] Error 2 (ignored)

Can anyone help me?
Any comment will greatly appreciate.
Thanks…

Hi Happyez,

sym.c:77: incompatible implicit declaration of built-in function ‘exit’

This warning is coming from GCC. The code needs to include the header file ‘stdlib.h’ in order to get the definition for the system call to exit. Otherwise GCC thinks you want to use it’s builtin (meaning defined internally by the compiler) exit. It probably safe to ignore, but you can add “#include <stdlib.h>” to fix it.

convert_emiss.o: In function .STATICS1': convert_emiss.f90:(.data+0x1384): undefined reference to module_initialize_real_’

This means that the linker can’t find a symbol that’s being used in your program. In this case it’s the Initialize Real Module found in “WRFV3/dyn_em/module_initialize_real.F”.

When you built WRF, did you build the ‘real’ case, or one of the idealized cases?

  • Mat

convert_emiss.o: In function .STATICS1': convert_emiss.f90:(.data+0x1384): undefined reference to module_initialize_real_’
make[1]: [convert_emiss] Error 2 (ignored)

I have the same problem when using pgi Version 10.9 (module_initialize_real does definitely exist). But convert_emiss compiles properly when I use version 9.0-1. However, I did not find the reason for this yet.