I am trying to install z3 library for Ocaml in Cygwin64 Terminal (Windows 11). I get the following error that it can't find -lstdc++ even though the liabrary is already installed.
# cc1: warning: command-line option ‘-fvisibility-inlines-hidden’ is valid for C++/ObjC++ but not for C
# ocamlmklib -o api/ml/z3ml -I api/ml -L. api/ml/z3native_stubs.o api/ml/z3enums.cmo api/ml/z3native.cmo api/ml/z3.cmo -lz3 -lstdc++ -cclib -L/usr/lib/gcc/x86_64-pc-cygwin/11 -ccopt -L$(ocamlfind printconf destdir)/stublibs -dllpath $(ocamlfind printconf destdir)/stublibs
# ** Fatal error: Cannot find file "-lstdc++"
# make: *** [Makefile:5081: api/ml/z3ml.cma] Error 2
# make: Leaving directory '/home/doanha/.opam/4.14.0+flambda+mingw64_for_utop/.opam-switch/build/z3.4.11.2/build'
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build z3 4.11.2
└─
╶─ No changes have been performed
Does anyone know what is the problem or how can I fix it?
I even set up the LDFLAGS points to it:
$ export LDFLAGS="-L/usr/lib/gcc/x86_64-pc-cygwin/11"
or copy -lstdc++ to /usr/lib/
Did you select the
libstdcpackage when installing Cygwin?If not, it may be useful to reinstall Cygwin with all dependencies.