CImg icon indicating copy to clipboard operation
CImg copied to clipboard

invalid pure specifier (only ‘= 0’ is allowed) before ‘<=’ token

Open t2dk49580 opened this issue 3 years ago • 3 comments

invalid pure specifier (only ‘= 0’ is allowed) before ‘<=’ token

line: 38682 38746 38813 38881

t2dk49580 avatar May 15 '22 06:05 t2dk49580

Looks like a duplicate of https://github.com/dtschump/CImg/issues/347

dtschump avatar May 15 '22 11:05 dtschump

CIMG conflicts with httplib. If CIMG first #include, httplib will report an error, and if httplib first #include, CIMG will report an error. Please help solve it

t2dk49580 avatar May 15 '22 23:05 t2dk49580

After investigation, it appears httplib include resolv.h which define macro _res (l.162). CImg uses _res as a variable name which creates the conflict.

Defining _res as a macro is really awful. Macros in a header file should be at least prefixed with something to avoid this kind of troubles.

I've renamed my variables _res to _resu as a workaround: https://github.com/dtschump/CImg/commit/a01439210974d9f285e3c93750f26cf276f5ffb5

dtschump avatar May 16 '22 06:05 dtschump