From: Petr P. <pp...@re...> - 2015-02-12 17:08:21
|
On Thu, Feb 12, 2015 at 05:17:17PM +0100, Petr Pisar wrote: > make[1]: Entering directory '/home/test/fedora/yap/yap-6.2.2/packages/swi-minisat2/C' > g++ -c -shared -fPIC -O3 -fomit-frame-pointer -Wall -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DHAVE_CONFIG_H -D_YAP_NOT_INSTALLED_=1 -I. -I../../.. -I./../../../include ./Solver.C -o Solver.o > g++ -c -shared -fPIC -O3 -fomit-frame-pointer -Wall -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -DHAVE_CONFIG_H -D_YAP_NOT_INSTALLED_=1 -I. -I../../.. -I./../../../include ./pl-minisat.C -o pl-minisat.o > ./Solver.C: In member function 'bool Solver::addClause(vec<Lit>&)': > ./Solver.C:123:41: error: 'Clause_new' was not declared in this scope > Clause* c = Clause_new(ps, false); > ^ > ./Solver.C:123:41: note: suggested alternative: > In file included from ./Solver.h:29:0, > from ./Solver.C:20: > ./SolverTypes.h:122:20: note: 'Clause_new' > friend Clause* Clause_new(const V& ps, bool learnt = false) { > ^ Attached patch makes the beast buildable. But my C++ knowledge is quite low so please review the patch. I made the Clause_new() method static. Another option is to move the definition from the class to the global name space scope and keep it friendly. -- Petr |