UW-Hydro / VIC

The Variable Infiltration Capacity (VIC) Macroscale Hydrologic Model
http://vic.readthedocs.io
MIT License
260 stars 383 forks source link

multiple definition of 'xxx'; ... first defined here #936

Open huangtk-gaoq opened 1 year ago

huangtk-gaoq commented 1 year ago

Bug Reports

pyested commented 5 months ago

Hi, I've faced the same problem and was able to solve it. It seems that some versions of ld exit with an error in case of multiple definitions. The way to solve it is to allow multiple definitions. I've done this adding the flag -Wl,--allow-multiple-definition in the Makefile to the CFLAGS variable (see image below). This way the compilation exits without errors. Hope this is helpful.

flag