DarkDefender / superpix

Minimal cpp port of SuperPixelator
GNU General Public License v3.0
4 stars 1 forks source link

Windows build #2

Closed Shin0nii closed 4 years ago

Shin0nii commented 4 years ago

Hi this is not an issue, but could you please send me a build for windows, I'm not able to build it, just getting all kinds of errors, tried for a couple of hours. Thanks a lot!

DarkDefender commented 4 years ago

I do not have Windows, so I can't check for myself.

I need more information from you to be able to help you.

Right now you are basically just telling me that you can't build it. But no information on why it won't build. Just that you get errors. So what the errors are specifically would be a good start.

Shin0nii commented 4 years ago

Every time Cmake just gives the error "Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)" I have installed zlib and libpng, but still the same error.

DarkDefender commented 4 years ago

As you are on Windows, CMake probably can't automatically find the library, so you will have to manually set PNG_LIBRARY PNG_PNG_INCLUDE_DIR in the project settings.

Shin0nii commented 4 years ago

Ok that did it. Now when building in visual studio I got a couple of errors:

Severity Code Description Project File Line Suppression State Error C2065 'M_PI': undeclared identifier super_pix C:\Program Files (x86)\super_pix\my_point.cpp 33
Error C2065 'M_PI': undeclared identifier super_pix C:\Program Files (x86)\super_pix\my_point.cpp 33
Error C2065 'M_PI': undeclared identifier super_pix C:\Program Files (x86)\super_pix\my_point.cpp 35
Error C2065 'M_PI': undeclared identifier super_pix C:\Program Files (x86)\super_pix\my_point.cpp 43
Error C2065 'M_PI': undeclared identifier super_pix C:\Program Files (x86)\super_pix\my_point.cpp 46
Error C2065 'M_PI': undeclared identifier super_pix C:\Program Files (x86)\super_pix\my_point.cpp 49
Error C2065 'M_PI': undeclared identifier super_pix C:\Program Files (x86)\super_pix\my_point.cpp 59
Error C2065 'M_PI': undeclared identifier super_pix C:\Program Files (x86)\super_pix\my_point.cpp 61
Error C2065 'M_PI': undeclared identifier super_pix C:\Program Files (x86)\super_pix\my_point.cpp 62
Error C2065 'M_PI': undeclared identifier super_pix C:\Program Files (x86)\super_pix\my_point.cpp 64
Error C2065 'M_PI': undeclared identifier super_pix C:\Program Files (x86)\super_pix\my_point.cpp 65
Warning C4459 declaration of 'slopeW' hides global declaration super_pix C:\Program Files (x86)\super_pix\polygonalizer.cpp 31
Warning C4100 'currPt': unreferenced formal parameter super_pix C:\Program Files (x86)\super_pix\polygonalizer.cpp 30
Warning C4189 'bestInd': local variable is initialized but not referenced super_pix C:\Program Files (x86)\super_pix\polygonalizer.cpp 232 Warning C4456 declaration of 'name' hides previous local declaration super_pix C:\Program Files (x86)\super_pix\nanosvg\src\nanosvg.h 289 Warning C4244 'initializing': conversion from 'double' to 'float', possible loss of data super_pix C:\Program Files (x86)\super_pix\nanosvg\src\nanosvg.h 1425
Warning C4244 'initializing': conversion from 'double' to 'float', possible loss of data super_pix C:\Program Files (x86)\super_pix\nanosvg\src\nanosvg.h 1433
Warning C4244 '=': conversion from 'double' to 'float', possible loss of data super_pix C:\Program Files (x86)\super_pix\nanosvg\src\nanosvg.h 1466
Warning C4244 '=': conversion from 'double' to 'float', possible loss of data super_pix C:\Program Files (x86)\super_pix\nanosvg\src\nanosvg.h 2509
Warning C4244 '=': conversion from 'double' to 'float', possible loss of data super_pix C:\Program Files (x86)\super_pix\nanosvg\src\nanosvg.h 2513
Warning C4244 '=': conversion from 'double' to 'float', possible loss of data super_pix C:\Program Files (x86)\super_pix\nanosvg\src\nanosvg.h 2517
Warning C4244 '=': conversion from 'double' to 'float', possible loss of data super_pix C:\Program Files (x86)\super_pix\nanosvg\src\nanosvg.h 2521
Warning C4244 '=': conversion from 'float' to 'int', possible loss of data super_pix C:\Program Files (x86)\super_pix\main.cpp 84
Warning C4244 '=': conversion from 'float' to 'int', possible loss of data super_pix C:\Program Files (x86)\super_pix\main.cpp 85
Error C2065 'M_PI': undeclared identifier super_pix C:\Program Files (x86)\super_pix\path.cpp 216 Warning C4458 declaration of 'point' hides class member super_pix C:\Program Files (x86)\super_pix\segment.cpp 44
Warning C4458 declaration of 'handle_in' hides class member super_pix C:\Program Files (x86)\super_pix\segment.cpp 48
Warning C4458 declaration of 'handle_out' hides class member super_pix C:\Program Files (x86)\super_pix\segment.cpp 52
Warning C4458 declaration of 'flag' hides class member super_pix C:\Program Files (x86)\super_pix\segment.cpp 119 Warning C4611 interaction between '_setjmp' and C++ object destruction is non-portable super_pix C:\Program Files (x86)\super_pix\write_png.cpp 79
Warning C4996 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. super_pix C:\Program Files (x86)\super_pix\write_png.cpp 62
Warning C4702 unreachable code super_pix C:\Program Files (x86)\super_pix\nanosvg\src\nanosvg.h 805 Warning C4701 potentially uninitialized local variable 'spanStart' used super_pix C:\Program Files (x86)\super_pix\polygonalizer.cpp 199 Warning C4701 potentially uninitialized local variable 'spanStart' used super_pix C:\Program Files (x86)\super_pix\polygonalizer.cpp 232

And it doesn't build successfully, any ideas?

DarkDefender commented 4 years ago

Perhaps you can try this: https://stackoverflow.com/a/61869812 ?

Shin0nii commented 4 years ago

Yes that did it, thank you so much!