mzucker / flow_solver

Fast automated solver for Flow Free in a single C or Python file.
https://mzucker.github.io/2016/08/28/flow-solver.html
Other
48 stars 21 forks source link

mergesord did not define yet #2

Open aqnaruto opened 7 years ago

aqnaruto commented 7 years ago

in c version

kk-kd commented 6 years ago

I met the same problem. The cmake process went well, but when I tried "make" command, it gave the following error:

cady@cady-Surface-Book-2:~/Desktop/flow_solver-master/flow_solver/build$ make Scanning dependencies of target flow_solver [ 50%] Building C object CMakeFiles/flow_solver.dir/flow_solver.c.o /home/cady/Desktop/flow_solver-master/flow_solver/flow_solver.c: In function ‘game_order_colors’: /home/cady/Desktop/flow_solver-master/flow_solver/flow_solver.c:1300:5: warning: implicit declaration of function ‘mergesort’ [-Wimplicit-function-declaration] mergesort(cf, info->num_colors, sizeof(color_features_t), ^ /home/cady/Desktop/flow_solver-master/flow_solver/flow_solver.c: In function ‘game_find_forced’: /home/cady/Desktop/flow_solver-master/flow_solver/flow_solver.c:1726:11: warning: variable ‘free_dir’ set but not used [-Wunused-but-set-variable] int free_dir = -1; ^ [100%] Linking C executable flow_solver CMakeFiles/flow_solver.dir/flow_solver.c.o: In function game_order_colors': /home/cady/Desktop/flow_solver-master/flow_solver/flow_solver.c:1300: undefined reference tomergesort' CMakeFiles/flow_solver.dir/flow_solver.c.o: In function game_search': /home/cady/Desktop/flow_solver-master/flow_solver/flow_solver.c:2372: undefined reference tofloor' collect2: error: ld returned 1 exit status CMakeFiles/flow_solver.dir/build.make:94: recipe for target 'flow_solver' failed make[2]: [flow_solver] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/flow_solver.dir/all' failed make[1]: [CMakeFiles/flow_solver.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

rickrich commented 5 years ago

I got the same thing. Patch attached. patch-qsort.txt