neperfepx / neper

Polycrystal generation and meshing
http://neper.info
GNU General Public License v3.0
214 stars 53 forks source link

Undeclared Function #807

Closed lkuna24 closed 9 months ago

lkuna24 commented 10 months ago

Currently on compile the following error occurs:

projects/neper/src/neut/neut_mesh/neut_mesh_fscanf/neut_mesh_fscanf_msh/neut_mesh_fscanf_msh1.c:30:7: error: call to undeclared function 'neut_mesh_fscanf_msh_version'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

   30 |       neut_mesh_fscanf_msh_version (file, &mode, &domain, ptopology);
      |       ^
1 error generated. 

There seems to be a simple fix for this (at least solely based on the functions that already exist inside of neut_mesh_fscanf). The function neut_mesh_fscanf_msh_version is defined in neut_mesh_fscanf_msh2.c, hence

To neut_mesh_fscanfmsh.h: Add: extern void neut_mesh_fscanf_msh_version(FILE *file)

In neut_mesh_fscanf_msh1.c: Adjust line 30 to: neut_mesh_fscanf_msh_version (file);

These changes made it possible to compile Neper on my machine.

rquey commented 9 months ago

Fixed in 03bf33ddba30f04c7a453db4e6c6754ac0d15d73.