Yes, the following tools are sufficient, though Visual Studio alone should be enough. The reason for suggesting you learn a language, preferable C, is because most chess programs are either written in C or C++ (an extension of C). And also, by the time you write your first program, say 'Hello World,' you have to compile it -- in essence, two birds with one stone; you learn basic C and how to compile from source.Prima wrote:Kingliveson, Peter C, Jeremy Berstein, and BB+,
I appreciate all these inputs. Much as I admire programming in itself, I want to learn how to compile a Windows executive file (or chess engine) from any given source code using the Intel 30-day trial version or any free compiler that is equally compatible with Windows/Intel PC platform.
I have come across few forums where an individual asks how to compile from source codes and the replies given suggests that executive file compiles can be compiled from source codes using the 2 tools I mentioned in my original post;
1. Microsoft Visual Studio 2010 Professional trail web installer and
2. Intel 30-day free trial Compiler
Can these 2 tools accomplish my task of attempting to compile chess engines? If yes, do I just place the main source code within the Intel compiler and it will automatically compile a chess engine for me?
Also from the Intel Compile download page excerpt I pasted in my original post, what sub-components,for the Intel compiler, should I select to be included in the main Intel compiler before the final download? Would it be better if I selected all compiler sub-components? Thanks immensely for any feedback.
Kingliveson, I'll look into the CLI. Thank you all.
How to compile from Source Codes and the Tools
- kingliveson
- Posts: 1388
- Joined: Thu Jun 10, 2010 1:22 am
- Real Name: Franklin Titus
- Location: 28°32'1"N 81°22'33"W
Re: How to compile from Source Codes and the Tools
PAWN : Knight >> Bishop >> Rook >>Queen
Re: How to compile from Source Codes and the Tools
JavaScript has that crazy prototypal inheritance disguised to look like Java, implicit global variables, weird semicolon insertion, no real standard library, and a whole host of other problems.Jeremy Bernstein wrote:Just to confuse matters further, if you want to learn something C-like that you can use immediately for useful stuff, learn Javascript. You can run it in your browser, build Flash and DashBoard with it, it looks like C, doesn't have silly whitespace rules like Python and will prepare you for nearly any kind of other programming you move on to.Peter C wrote:If you want him to learn "the core of programming" you might as well have him learn assembly.
C is ancient. It doesn't support object oriented programming, it doesn't support functional programming (aside from function pointers, but those hardly count), and you have to manage your own memory. And don't tell him to learn C++, that takes years to learn.
He could easily learn Python in a month. He could be writing useful things in Python in well under a month. The only problem is that he has a C compiler. So, yeah, I guess he should learn C.
Peter
It looks like C, but it doesn't act like C. It's more like Lisp, and really is a functional (as opposed to procedural like C) language.
Python's whitespace rules really aren't that weird when you think about it. You indent your lines anyway, right? And it avoids having all those messy braces and semicolons everywhere.
Prima, if you want to compile chess programs and stuff you should learn C or C++ (which is what most chess programs are written in). Instead of those trials I can highly recommend MinGW, which ports the GCC compiler and some other tools to Windows. The only real limitation is that you won't be able to make 64-bit compiles, although somebody mentioned in my Stockfish GTB thread that there is a 64-bit version. I don't know if it works though.
Peter
-
- Posts: 11
- Joined: Thu Jun 10, 2010 6:04 am
Re: How to compile from Source Codes and the Tools
I am hosting WPG System64 which uses gcc. It can compile 32 or 64-bit apps. It works very well.Peter C wrote:I can highly recommend MinGW, which ports the GCC compiler and some other tools to Windows. The only real limitation is that you won't be able to make 64-bit compiles, although somebody mentioned in my Stockfish GTB thread that there is a 64-bit version. I don't know if it works though.
Peter
http://www.horizonchess.com/wpg64/
Ron
Re: How to compile from Source Codes and the Tools
Thanks everybody for the suggestions and help.
The entire Saturday was a waste as I could not finish everything or configure the compiler. I guess after installing the Intel 30-day trial compiler, I'm still lost as to the next step in order to compile a windows executive file from an open source engine. I Googled extensively but most tutorials do not provide the same settings as seen on my PC. From my Windows Start menu, I have;
All Programs/Intel Parallel Studio XE 2011/:
Parallel Studio XE 2011 with VS2010/:
Command Prompt
Documentation
Getting Started
Intel Compiler XE
The 'Getting Started' seems not helpful to me, unless I'm missing something here. Any further instruction here would is appreciated. Thanks.
Ron Murawski, I downloaded the Ming64-bit compiler along with the MingW64 1.99 patcher provided from your link/site. Thanks. I may have to look into that as well.
The entire Saturday was a waste as I could not finish everything or configure the compiler. I guess after installing the Intel 30-day trial compiler, I'm still lost as to the next step in order to compile a windows executive file from an open source engine. I Googled extensively but most tutorials do not provide the same settings as seen on my PC. From my Windows Start menu, I have;
All Programs/Intel Parallel Studio XE 2011/:
Parallel Studio XE 2011 with VS2010/:
Command Prompt
Documentation
Getting Started
Intel Compiler XE
The 'Getting Started' seems not helpful to me, unless I'm missing something here. Any further instruction here would is appreciated. Thanks.
Ron Murawski, I downloaded the Ming64-bit compiler along with the MingW64 1.99 patcher provided from your link/site. Thanks. I may have to look into that as well.
- kingliveson
- Posts: 1388
- Joined: Thu Jun 10, 2010 1:22 am
- Real Name: Franklin Titus
- Location: 28°32'1"N 81°22'33"W
Re: How to compile from Source Codes and the Tools
Stockfish (version 2.01) is one of the easiest open-source chess programs to build, and will be used in the example. I extracted the archive, and renamed the src directory to Stockfish201.Prima wrote:I need help/instructions [...]. [...]. I have downloaded the Microsoft Visual Studio 2010 Professional trail web installer. With the download of the intel compiler [...]
[...] I'm interested in compiling mainly 64-bits. [...]
1. With Visual Studio running...Click the File menu , select New, and then Project...
2. Expand Visual C++ template and select General. Browse to and chose the directory that has the source files, then type the project Name, and click Empty Project.
3. Right click the newly created project under Solutions Explorer, and select Add, and Existing Items...
4. Browse to the directory containing the source files (not solutions directory). Select all the files and click Add. All the files can be selected by simply clicking on the first file, scroll down, with the Shift key pressed, click on the last file.
5. To build x64 executables, select Configuration Manager from the Solutions Platforms drop menu.
6. Choose New from the Active solution platform.
7. Select x64, click Ok and the Close.
8. Select Release (default is Debug) from Solution Configuration drop menu.
9. To build the source, select from Build menu, Build Solution.
10. Upon successful compilation, your new executable should be available in the solutions directory (...\x64\Release\Stockfish201.exe for example).
11. To use Intel Compiler, select your Intel version from Project menu, choose Use Intel C++, and click Ok.
You can edit source files by expanding Source File filter, and double clicking a file. There are also optimizations that can be configured under project property...Google is very resourceful.
For Linux, you open terminal in the source directory containing Makefile and run make.
- Attachments
PAWN : Knight >> Bishop >> Rook >>Queen
Re: How to compile from Source Codes and the Tools
Umm, with Stockfish at least, you need to append the "ARCH=..." part to the "make" command.For Linux, you open terminal in the source directory containing Makefile and run make.
Re: How to compile from Source Codes and the Tools
Thanks, Kingliveson, for your time and the tutorials. I'll try it out. Thanks BB+ for your input.
Re: How to compile from Source Codes and the Tools
Kingliveson,
A big 'thank you' for the compile tutoring. I really appreciate it but at a lost for words to express my gratitude to you. I finally made my compile of Tinapa 1.01 for 64-bit, found here http://www.open-chess.org/viewtopic.php ... 9210#p9210
Next, I'll try to compile a 64-bit ComStock 2.0.1 and hopefully Stockfish 2.0.1GTB.
Thanks also to others who gave pointers.
A big 'thank you' for the compile tutoring. I really appreciate it but at a lost for words to express my gratitude to you. I finally made my compile of Tinapa 1.01 for 64-bit, found here http://www.open-chess.org/viewtopic.php ... 9210#p9210
Next, I'll try to compile a 64-bit ComStock 2.0.1 and hopefully Stockfish 2.0.1GTB.
Thanks also to others who gave pointers.
Re: How to compile from Source Codes and the Tools
Hi, could there be given instructions on how to make a 64bit compile with a minimalistic install? Microsoft Visual Studio 2010 seems to be 7GB and that seems excessive.
I recall I used some small program for my custom TSCP compiles, but I don't remember what since it was several years ago.
I recall I used some small program for my custom TSCP compiles, but I don't remember what since it was several years ago.
-
- Posts: 11
- Joined: Thu Jun 10, 2010 6:04 am
Re: How to compile from Source Codes and the Tools
One of these maybe?Uly wrote: I recall I used some small program for my custom TSCP compiles, but I don't remember what since it was several years ago.
MinGW-w64 -- a 32/64-bit Build and Development Environment for Windows (CygWin) with minimal toolchain. No GUI IDE. Open-source. Contains GCC
http://sourceforge.net/projects/mingw-w64/
Open Watcom -- Open Watcom 32/64-bit C/C++ compiler with IDE + tools for Windows. Open-source.
http://www.openwatcom.org/
MinGW -- 32-bit builds for Windows. No GUI IDE. Open-source. Contains GCC
http://www.mingw.org/
Digital Mars -- C/C++ and D 32-bit compilers for Windows. Free. Some Free GUI IDEs support the D language.
http://www.digitalmars.com/
LCC-Win32 -- LCC C compiler with IDE + tools for Windows. Free.
http://www.cs.virginia.edu/~lcc-win32/
Ron