autotune icon indicating copy to clipboard operation
autotune copied to clipboard

Missing #include in match.c?

Open bcriger opened this issue 9 years ago • 6 comments

Hello,

I'm getting an error when I try to compile. In match.c, the constants INT_MAX, UINT_MAX and LONG_MAX are used but not defined. I've noticed that if I add an #include <limits.h> at the top, these errors vanish. Was this the right thing to do?

Cheers,

Ben

bcriger avatar Oct 19 '16 08:10 bcriger

I also did this. I also can't find the 'load_json' method in polyestimate. How did you get around this error? I don't see this method in the cJSON folder.

esabo avatar Feb 01 '17 19:02 esabo

This was a while back, but I'm pretty sure I ended up working from a much earlier commit in this repo, in which the library with the load_json method is still part of the codebase. Maybe the earlier release builds will work (see https://github.com/adamcw/autotune/releases/tag/v2.0.1), though I haven't tested.

bcriger avatar Feb 01 '17 19:02 bcriger

I am having similar issues with the current build. When trying to compile I see errors about INT_MAX and LONG_MAX not being defined. When I add #include <limits.h> to match.c I get errors that load_json is not declared in scope. I get this behavior both when I use Cygwin on Windows and try it out on a Linux machine. I will see if earlier versions work for me...

ciaranra avatar May 24 '17 04:05 ciaranra

Yes, the newest releases do not compile. Go back to an earlier version to get working code.

esabo avatar May 24 '17 14:05 esabo

I solved the 'load_json' issue in the polyestimate.c file as follows:

  1. Comment in all these statements "json = load_json(in);"
  2. Replace them by "json = cJSON_Parse(fname);"

Then, it compiled and I am able to run the example given in the README.md file.

josanabr avatar Oct 12 '17 14:10 josanabr

I solved the 'load_json' issue in the polyestimate.c file as follows:

  1. Comment in all these statements "json = load_json(in);"
  2. Replace them by "json = cJSON_Parse(fname);"

Then, it compiled and I am able to run the example given in the README.md file.

OMG it works!!thank you very much

missingpuzzle233 avatar Aug 26 '20 03:08 missingpuzzle233