dwavesystems / qbsolv

Qbsolv,a decomposing solver, finds a minimum value of a large quadratic unconstrained binary optimization (QUBO) problem by splitting it into pieces solved either via a D-Wave system or a classical tabu solver. (Note that qbsolv by default uses its internal classical solver. Access to a D-Wave system must be arranged separately.)
https://docs.ocean.dwavesys.com/projects/qbsolv
Apache License 2.0
912 stars 229 forks source link

compilation on Cygwin (Windows) #21

Closed jmsellier closed 7 years ago

jmsellier commented 7 years ago

Hello,

It's very exciting that DWAVE is sharing qbsolv! I managed to compile it on a Windows machine by using the Cygwin terminal. I used gcc 4.9.2 and got the following error:

_gcc -Ofast -c -o dwsolv.o dwsolv.c gcc -Ofast -c -o util.o util.c gcc -Ofast -c -o solver.o solver.c solver.c: In function ‘solve’: solver.c:400:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before numeric constant const int QLEN 20; ^ solver.c:405:38: error: ‘QLEN’ undeclared (first use in this function) Qlist = (short**)malloc2D(maxNodes, QLEN + 1, sizeof(short)); ^ solver.c:405:38: note: each undeclared identifier is reported only once for each function it appears in

: recipe for target 'solver.o' failed make: *** [solver.o] Error 1_ This was solved by modifying line 400 of solver.c from: `const int QLEN 20;` to: `const int QLEN=20;` I hope this helps, JM Sellier
jmsellier commented 7 years ago

This is now fixed. Thanks!

mwbooth commented 7 years ago

The original code was

define QLEN 20

I am curious how it ever evolved to const int QLEN 20

jmsellier commented 7 years ago

Well, this is what I found in the repo last Saturday morning ;-)

JM

2017-01-17 17:22 GMT+01:00 mwbooth notifications@github.com:

The original code was

define QLEN 20

I am curious how it ever evolved to const int QLEN 20

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/dwavesystems/qbsolv/issues/21#issuecomment-273218012, or mute the thread https://github.com/notifications/unsubscribe-auth/ANNEtlDPIYv-gPVid__eao5s27OJi0FLks5rTOrTgaJpZM4LkRVv .

-- Jean Michel Sellier, Ph.D., M.Sc.

www.nano-archimedes.com

www.gnu.org/software/archimedes

www.gnu.org/software/nano-archimedes

www.gnu.org/software/gneuralnetwork

http://en.wikipedia.org/wiki/GNU_Archimedes