Skip to content
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

ld: library not found for -lnetcdf collect2: error: ld returned 1 exit status #54

Closed
davidn182 opened this issue Nov 6, 2017 · 3 comments

Comments

@davidn182
Copy link

I am very new to programming. I am trying to install AXISEM and it has a makefile that throws me the following error:

ld: library not found for -lnetcdf
collect2: error: ld returned 1 exit status

The part of code where the error is thrown is the following
ifeq ($(strip $(USE_NETCDF)),true)
FFLAGS += -Dunc
ifdef NETCDF_PATH
LIBS = -L $(strip $(NETCDF_PATH))/lib -lnetcdff -Wl,-rpath,$(strip $(NETCDF_PATH))/lib
INCLUDE = -I $(strip $(NETCDF_PATH))/include
else
LIBS = -lnetcdff
INCLUDE = -I /usr/include
endif
else
LIBS =
INCLUDE =
endif

Thanks in advance if anyone can help me.

@sstaehler
Copy link
Contributor

Hi @davidn182 ,

It seems to me, that the code cannot find netcdf. Did you install it?

@davidn182
Copy link
Author

Hi thanks, I uninstall and reinstall netcdf and that solved the problem.

@sstaehler
Copy link
Contributor

Great, I'm closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants