Be warned, I have a lot of questions, and I appreciate any attempt to help me.
To my understanding a library should be designed to be used without requiring information about the implementation.
Let's take a look at:
https://github.com/v2k/poker-eval
I want to use 1 function from this library. Say I want to compile it.
Do libraries require the user to be knowledgeable of the implementation used in order to compile it? Do libraries require the user to be knowledgeable of every compilation technique in use to be able to compile it? If the answer is no, does this library in particular fail to meet those requirements and requires a greater knowledge of the implementation for me to actually use it?
On another note, do library usually require more documentation than this? Or is this library as readable an understandable as I can expect?
I started reading the library from the "eval.c" in the examples folder.
https://github.com/v2k/poker-eval/bl...xamples/eval.c
In the first line only I had to go through 3 files in order to find out what HandVal was. I feel that at this pace, if I want to understand a simple example program, I am going to have to go through all of the files.
On the other hand there's this chess program.
http://www.craftychess.com/crafty-23.4.zip
Which although I still have difficulty reading, it's well documented and I can skip the parts I don't understand. And obviously, if I could compile it I could use it, but I can't use the functions because they are not designed to be used without knowing the implementation details.
But I still couldn't compile this one. Probably because it is designed to be compiled with the makefile.
Since the source code is completely dependent on macros set by the makefile, I am assuming it shouldn't be attempted to compile without the makefile. If that is so, how can I compile it in windows? I have never been able to run a makefile (or any source code not created by me). Are makes solely to be used by their compilers? Or are they usable by other compilers? Can I compile this with Vc++ express, pelles C, mingw or cygwin?(Yep, I tried them all.)
In an attempt to reduce the number of questions here are the main four.
I can't compile the first library. Are all libraries this hard to compile?
It's very hard to read this library. Are all libraries this hard to read?
I can't compile the chess program. How is this program designed to be compiled and by what compilers?
This program is pretty hard to read.How is this program designed to be read? What is a good IDE where I can, say, click on a function, typedef, define. And the program will direct me to the definition of said element? (Or is this feature not needed to read the program easily?)
Thanks a lot. This has been one of my big barriers in learning to code for years, I am basically restricted to the C's ISO standard libraries and my own functions and programs.
Last edited by LoveThee; 08-28-2014 at 02:33 PM.