Distribution of a PGN parser library

Discussion of chess software programming and technical issues.

Moderator: Ras

mathmoi
Posts: 290
Joined: Mon Mar 13, 2006 5:23 pm
Location: Québec
Full name: Mathieu Pagé

Distribution of a PGN parser library

Post by mathmoi »

Hi,

In the last couple of months I wrote a PGN parser library that I intend to open source. The library is written in C++, but I intend to provide a C wrapper and a Python module (I will personally need the python module for another project).

I'm trying to plan how a client application could use my library and I've got three options:­
  1. Incorporate the library code into the client application's code. The library is compiled "into" the application.
  2. Static library
  3. Dynamic library
I think that a static library might be the best choice. If you were to use such a library, how would you prefer to link it to your application?

Thanks,[/list]
jdart
Posts: 4420
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Distribution of a PGN parser library

Post by jdart »

There is no reason not to support all 3 options.

The Gaviota tablebase code for example can be built as a library or directly incorporated (linked in).

--Jon
mathmoi
Posts: 290
Joined: Mon Mar 13, 2006 5:23 pm
Location: Québec
Full name: Mathieu Pagé

Re: Distribution of a PGN parser library

Post by mathmoi »

You're right.

I guess I'll provide a Makefile with a static and dynamic targets and instructions on how to use it as source.