sat-group / open-wbo

Open-WBO: state-of-the-art MaxSAT and Pseudo-Boolean solver
Other
69 stars 12 forks source link

mpxx.h' file not found #16

Open Kerry12342 opened 6 months ago

Kerry12342 commented 6 months ago

I got this when "make"

a1880 commented 6 months ago

gmpxx.h header file is included in the libgmp-dev package

You can install it on Ubuntu based machines with this command:

$ sudo apt-get install libgmp-dev

Source

Kerry12342 commented 6 months ago

Thanks for the suggestion!

I use MacBook so I have to use homebrew to install gmp. Just in case this might be helpful. I listed my solution here.

brew install gmp and use brew --prefix gmp to find the path, which I used <path to gmp> and the path looks like /<...>/gmp in the later lines, to gmp so I can edit the Makefile

I also have to edit the Makefile to change the CFLAGS += -Wall -Wno-parentheses -std=c++11 -DNSPACE=$(NSPACE) -DSOLVERNAME=$(SOLVERNAME) -DVERSION=$(VERSION) to CFLAGS += -Wall -Wno-parentheses -std=c++11 -DNSPACE=$(NSPACE) -DSOLVERNAME=$(SOLVERNAME) -DVERSION=$(VERSION) -I<path to gmp>/include

and change the LFLAGS += -lgmpxx -lgmp to LFLAGS += -lgmpxx -lgmp -L<path to gmp>/lib