PDA

View Full Version : Can someone build this very small C++ file, I just can't get it to work


mad_pc_man
02-17-09, 02:21 PM
Hi,
I have a very small C++ program I'd really like to use, its a solver program for hexic hd. The program can be found at http://www.paulbanks.org/download/files/hexicsolver.0.1.tgz

It's only 11KB.

I have tried myself, I downloaded MS C++ Express but I just can't seem to get it to work.

A simple build and attachment to a post would be hugely appreciated, or an email with attachment to flyingsouth at gmail dot com

iLoki
02-18-09, 11:57 AM
well.. if its a .tgz chances are it came from a linux/unix developer? Try devC++

http://www.bloodshed.net/devcpp.html

my bet is that it was written to be compiled with GCC or something along those lines, and DevC++ uses MinGW, which is a port of GCC to windows.

EDIT: You may want to use something like CygWin to run the makefile and build the application. http://www.cygwin.com/

mad_pc_man
02-18-09, 03:43 PM
Can you/someone not just build it for me? It won't take two ticks I'm sure

iLoki
02-18-09, 03:51 PM
well I'm at work and don't have any of that stuff with me lol
I'll take a crack at it later and see how it goes.

mad_pc_man
02-18-09, 03:54 PM
Thanks so much, I have just tried DevC++ and I couldn't get it to work, but then again I've never even seen source code before now.

If you could get it to work that would be awesome thanks.

ShadowPho
02-18-09, 06:03 PM
Would you like it built for windows or linux?

mad_pc_man
02-19-09, 05:24 AM
Windows please

mad_pc_man
02-22-09, 09:49 AM
bump?

Bjm2587
02-22-09, 12:16 PM
Are you using vista? I had a hell of a time trying to get dev to work on vista but it's possible.

teddythetwig
02-22-09, 11:22 PM
Not sure how to attach a file to a post put I'm working on it now..

Jayws
02-23-09, 12:04 AM
Not sure what the deal is here, I looked at the makefile and it uses a command that I don't recognize. This isn't something that I've been able to compile in windows, I'll give it a try on my linux box.

all:
g++ -o hexicsolve-test -O2 main.cpp
swig -c++ -python hexicsolve.i
g++ -O2 -fpic -c hexicsolve_wrap.cxx `python2.5-config --includes`
g++ -O2 -shared hexicsolve_wrap.o -o _hexicsolve.so

dyst0pia
02-23-09, 01:33 AM
swig there is basically making python code out of C++. Unfortunately, that also means you'll need a python interpreter after you get this compiled; the end result are some object files compiled from the C++, plus a python file that needs to be interpreted to actually run the program. To be honest, it may be easier to just get Cygwin, compile it yourself, and use Cygwin to run it.

ShadowPho
02-23-09, 03:21 AM
Done. The C code is completely independent of the (seems GUI?) python code. This C code was compiled in dev-cpp under mingw g++?. Dunno the version. Sorry I am a bit late.

mad_pc_man
02-24-09, 02:06 PM
Thanks so so much it is hugely appreciated
:D :D :D

ShadowPho
02-25-09, 01:23 AM
Thanks so so much it is hugely appreciated
:D :D :D

No problem. :)
It'd be faster under linux. "g++ main.cpp"

dyst0pia
02-25-09, 07:38 PM
No problem. :)
It'd be faster under linux. "g++ main.cpp"

You wouldn't even have to figure that out on linux either (which file to compile, that is). So... even faster. "make" :)

aliylum
08-31-12, 04:02 AM
Hey guys,

Know this is an olddd topic but curious to see if anybody has used this board solver programme and how well it works?

Looking at the release notes for the programme, it says:


It will only look three moves deep. (Any more takes considerably longer and is of questionable value anyway - at least in this implementation)



The game engine is simplified. It doesn't do special things with special pieces. (Stars are only used for scoring) If you manage to make any other strange pieces (like shells, bombs or pearls) it doesn't deal with them.


Does this help in forming black pearls?