Chris00 / ocaml-cairo

Binding to Cairo, a 2D Vector Graphics Library.
GNU Lesser General Public License v3.0
54 stars 8 forks source link

Can't compile Cairo2 on Windows (Diskuv) #34

Open F-Loyer opened 1 year ago

F-Loyer commented 1 year ago

I am trying to compile lablgtk3 and it fails at cairo2.

It seems the include path doesn't contains freetype.

I have the error:

# compiling c program:
# [...]
#  | #else
#  | const char *s1 = "BEGIN-1-false-END";
#  | #endif
#  |
# run: cl -nologo -O2 -Gy- -MD    -I C:\gtk\include\cairo -I C:/Users/frede/AppData/Local/Programs/DISKUV~1/lib/ocaml -FoC:\Users\frede\AppData\Local\Temp\build_8016ba_dune\ocaml-configurator6f6e1a\c-test-2\test.obj -c C:\Users\frede\AppData\Local\Temp\build_8016ba_dune\ocaml-configurator6f6e1a\c-test-2\test.c
# -> process exited with code 2
# -> stdout:
#  | test.c
#  | C:\gtk\include\cairo\cairo-ft.h(46): fatal error C1083: Impossible d'ouvrir le fichier include : 'ft2build.h' : No such file or directory
# -> stderr:
# Error: failed to compile program

My cairo-features.h file has a #define CAIRO_HAS_FT_FONT 1 line, but discover.ml fails to find it.

Chris00 commented 1 year ago

Where is ft2build.h on your system?

F-Loyer commented 1 year ago

It was in C:\Gtk\include\freetype2.

Fixed by adding the C:\Gtk\bin in the path (then the pkg-config is founded).

Chris00 commented 1 year ago

I've added that path to the discover script. Let me know how it goes.