How to libart_lgpl win32

In this tutorial I'll walk you through the steps of building libart_lgpl using msvc visual studio 6

  1. Create a new empty project by clicking on File menu->New
    you should see the following image

    Under project name: give your project a name and note what Location: the project is created in. Here on out that location will be referred to as the project root directory. My project directory is: C:\DOCUMENTS AND SETTINGS\ADMINISTRATOR\DESKTOP\LIBART_LGPL-2.3.16\ and I named by project, libart_lgpl, Take note visual studio 6 will append libart_lgpl after the location, so you will have to manually remove this.

  2. On th next screen choose An empty project and click Finish


  3. My visual studio environment now looks like this:


  4. Next add the source files from the libart_lgpl source by right clicking on the on the project in the workspace sidebar. Omit testart.c and testuta.c
  5. In cygwin run the configure script to generate a config.h. I used ./configure --host=i386-pc-mingw32
    edit the generated config.h by commenting out /*#define HAVE_ALLOCA_H 1*/
    Note: depending on your config.h you might need to do more modifications here to get msvc to compile libart_lgpl

  6. get a .def file. I got one from here:
    http://www.mit.edu/afs/sipb/project/mozilla/random-stuff/mozilla.bak/other-licenses/libart_lgpl/libart.def
    and add it to the project.
  7. In Project Settings, in the preprocessor section under the C/C++ tab...


    define LIBART_COMPILATION

    At this point you should have a working lib and dll file
    in your Debug directory.

  8. Lets Make sure the dll works. Create a new project by clicking on File->New and setting things up to look like the screen below:

    Again, make sure to set the project directory to the original project root from above
  9. select empty project again
  10. add the file testart.c to the testart project using the same steps as described above.
  11. Set up a project dependency by clicking on Project->Dependencies.

  12. The project should compile now but complain about not finding the libart_lgpl.dll to fix this in the testart project settings change the working directory for the project

  13. That's about it. You'll notice that testart takes some command line arguments you can set them in the screen above. Note: I've noticed there seem to be some bugs in the win32 version
  14. here's a link to a copy of how I built it using vc studio 6.0 libart_lgpl-2.3.16.rar
    You'll need to get a copy of rar. Using google with the search term: winrar should find the download site in the first hit.