adamcw / autotune

MIT License
17 stars 9 forks source link

Missing #include in match.c? #1

Open bcriger opened 8 years ago

bcriger commented 8 years ago

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

esabo commented 7 years ago

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.

bcriger commented 7 years ago

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.

ciaranra commented 7 years ago

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...

esabo commented 7 years ago

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

josanabr commented 7 years ago

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.

missingpuzzle233 commented 4 years ago

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