-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble Referencing installed libraries #216
Comments
OK, did you check the directories you are giving in your -L arguments to see if the .a or .so files are present? Also I don't think it's w3, it's w3emc_4. But look in the directories to see what files you have. |
Thanks Ed! Yes, if I look into each libraries' dir there are .a files. So, next is setting the linking and naming of the libraries correctly. Thanks, |
Set the directory with the -L argument, then link to the library by putting a -l in front of the name, and leaving off the .a. Like this:
|
Thanks! |
OK, I'll close this issue, let me know if you need any more help. |
Describe the bug
This could be an installation or bad referencing issue but bug seemed to be the right choice. Appreciate your help or suggestions. I recently had NCEPLIBS installed for us on our new linux RHEL 8 compute farm vms for NCEP/OPC. The libraries are not being recognized by my makefile that builds fortran code using the gfortran compiler. I'm not sure if I'm using the correct library names or if there was a problem with the installation.
To Reproduce
I'm trying to compile FORTRAN code to make grib2 files that uses the libraries bacio, w3 and g2_4
When running the makefile I get the following:
make
/usr/bin/gfortran -o nc2grib_ncom ./nc2grib2_ncom.o -L/opt/common_apps/nceplibs/spack/opt/spack/linux-rhel8-skylake_avx512/gcc-8.5.0/ -lg2_4 -lw3 -lbacio -L/usr/lib64 -ljasper -lpng -lz
/usr/bin/ld: cannot find -lg2_4
/usr/bin/ld: cannot find -lw3
/usr/bin/ld: cannot find -lbacio
Expected behavior
The location of the libraries is linked in the makefile so I'm not sure why they are not found. Tried different variations of the library names as they are listed in the installation dirs but this gave same error.
Build Information
How did you build or access NCEPLIBS?
Installed recently by NCO Helpdesk who have root privledges.
System
On what system are you running the code?
Linux RHEL8
Additional context
The code was written several years back and hoping to recompile it for a change in our systems. Appreciate any help or suggestions.
The text was updated successfully, but these errors were encountered: