Quote:
Yes i have two files with extension .a in Documents\pokereval\lib\.libs:
libpoker-eval.a and libpoker-eval.dll.a
Cool beans. I am pretty sure you are going to want to link to libpoker-eval.dll.a since you are running cygwin. If you were running in a native Linux environment you would link to libpoker-eval.a.
Ok in attempt to reduce a little bandwidth. I assume you want to call one of the libpoker-eval.dl.a functions. Find the correct signature of the function that you want to call and keep it handy.
At this point I believe you have 4 different ways you could go:
1) Create your own source file, a .c or .cpp source file that includes the .h file that contains the signature of the poker-eval function you want to call. Create a command line that will compile and link your source file and the library file. If you are going this route I recommend a bash script that has the command and just run the script. I don't recommend this route because you'll eventually be adding more code I would think. This might be ok for a quick and dirty way to see how things are working for you.
2) Create your own make file that builds your application. You will have to learn how they work. I don't recommend this either but this is a better way than 1) in the long run.
3) Install Eclipse-CDT on cygwin and create a project that will include your source code and the library. Create a HelloWorld type application and replace the code Eclipse generates with your code.
I do recommend this way for a few reasons. The first is that it is handy and makes it easy to build your app. The second reason is that Eclipse-CDT will actually create a make file for you and you can copy it to another folder at a later time and use it as a model if you want to put it on GitHub for instance. I always understood the concept of make files but often when I looked at them they were incomprehensible. I read up on them a little bit and realized how many implied settings there are and thus it became clear as to why they were often incomprehensible. If you look at the way Eclipse constructs the make file infrastructure, it is really easy to figure out what is going on and easy to modify. So you get that benefit as well as getting up and running fairly easily. There are some quirky things about Eclipse-CDT but I can get through enough to build the application.
4) Switch to Visual Studio. I did notice in the GitHub link that there are some VS project files in there but the stuff about DOS and nmake didn't give me a warm fuzzy. Since you already have the libraries built, no need to go down that path at this time.
Go ahead and post any code your are in doubt about or what the assignment I've given you
.