Skip to content

fixed compile error for gcc 11.4 #7

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

Open
wants to merge 2 commits into
base: dev-skjmodel
Choose a base branch
from

Conversation

pletzer
Copy link

@pletzer pletzer commented May 11, 2025

With gcc 11.4 I get the following error:

src/seapodym_coupled.cpp: In function ‘void verify_identifier_string2(char*)’:
src/seapodym_coupled.cpp:621:29: error: cannot call member function ‘DF_FILE* gradient_structure::get_fp()’ without object
621 | gradient_structure::get_fp()->fread(str,num_bytes);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
src/seapodym_coupled.cpp: In function ‘int save_identifier_string2(char*)’:
src/seapodym_coupled.cpp:646:29: error: cannot call member function ‘DF_FILE* gradient_structure::get_fp()’ without object
646 | gradient_structure::get_fp()->fwrite(str,length);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
src/seapodym_coupled.cpp: In function ‘void save_long_int_value(long unsigned int)’:
src/seapodym_coupled.cpp:654:29: error: cannot call member function ‘DF_FILE* gradient_structure::get_fp()’ without object
654 | gradient_structure::get_fp()->fwrite(y,num_bytes);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
src/seapodym_coupled.cpp: In function ‘long unsigned int restore_long_int_value()’:
src/seapodym_coupled.cpp:661:29: error: cannot call member function ‘DF_FILE* gradient_structure::get_fp()’ without object
661 | gradient_structure::get_fp()->fread(&tmpout,num_bytes);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
make: *** [Makefile:151: objs/seapodym_coupled.o] Error 1
(

I think gradient_structure::get_fp() should be replace with gradient_structure().get_fp()

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

Successfully merging this pull request may close these issues.

1 participant