Closed sonichy closed 5 years ago
gif.h is a header-only library. It must be included in only one .cpp file.
(Would be nice if you could set a #define
before including it to get only function declarations, not implementations. I would need that, except I'm using an autogenerated header file for another language anyway.)
Split the gif.h to gif.h(declaration) and gif.cpp(implementation) solved this problem !
//gif.h
#ifndef gif_h
#define gif_h
int GifIMax(int l, int r);
......
#endif
//gif.cpp
#include "gif.h"
int GifIMax(int l, int r) { return l>r?l:r; }
......