VC++?

Posted by Murphy on Sun 29 Jul 2018 07:18 PM — 3 posts, 17,941 views.

USA #0
Please bear with me: I have no coding education or experience. I am retired and just playing around with the code on my personal computer: not open to the public, nor ever will be.

Originally, I downloaded smaug1.4a and was able to compile and run that using VC++ (I'm still working my way through Visual C++ for Dummies). That serves my purpose; but, I did run into some things I couldn't figure out. Judging from the posts here, I decided to give smaugfuss1.9 a try, as that sounded a little easier for the novice to navigate.

The problem I'm having is that I can't seem to compile it. It didn't come with a workspace like smaug1.4a did. Do I have to build one from scratch and add in the files? Or is it hidden in there somewhere I have yet to look?

Yes, I understand that I can't expect to learn as much as someone who studied this in school; but, I'm not afraid to crash my mud. I keep backups after every (apparently) successful change I make; and, I find I learn probably more from my failures than I do from my successes. Basically, all I want to do is kill some time and be able to say: "Hey! Look what I can make it do!"

Any help would be greatly appreciated.
Thanks!
Mama Murphy
Australia Forum Administrator #1
To make life easier for yourself I suggest installing Cygwin, which is "Unix under Windows".

Cygwin home page

The later versions of Smaug are designed for compiling under that. I think, once you have Cygwin installed, you open up a "bash" window (the icon should be installed on your desktop), then get the download, navigate to the "src" directory, and type "make".

It is available from a Git repository: SmaugFUSS

When installing Cygwin make sure you select various optional packages, including "git" and "compiler tools (C++ etc)".

Something like this (using bash):


git clone https://github.com/InfiniteAxis/SmaugFUSS.git

cd SmaugFUSS/src



Edit the file "Makefile" and uncomment this line near the start:


#CYGWIN = -DCYGWIN


In other words, change it to:


CYGWIN = -DCYGWIN


Now type "make" and it should all compile:


  Compiling o/imc.o....
  Compiling o/act_comm.o....
  Compiling o/act_info.o....
  Compiling o/act_move.o....
  Compiling o/act_obj.o....
  Compiling o/act_wiz.o....
  Compiling o/ban.o....
  Compiling o/boards.o....
... etc ...


There are some good multi-platform editors around, I use Geany which runs on Windows, Mac and Linux.

Geany can handle the different line-endings you might find (Linux rather than Windows) and has some nice features like showing symbols and function names in a panel on the left.
Amended on Mon 30 Jul 2018 09:31 PM by Nick Gammon
Australia Forum Administrator #2
Git is very useful for keeping track of your changes. If you follow my suggestions above, you can type "git diff" at any time (in the bash window) and it will show you what changes you have made.

I have a post about using Git here:

http://www.gammon.com.au/forum/?id=12432