Compiling K-Meleon plugins with MinGW/GCC

0. Introduction

Quoting the building instructions for K-Meleon (http://kmeleon.sourceforge.net/docs/build.php)

What you'll definately need on your system is Visual C++ 6 with service pack 3 or higher.

This text is intended to help you at least compile a few plugins by using GCC as included in the MinGW project instead of VC++. (Other free C++ compilers should work as well; Try Cygwin/GCC, for instance)

1. Get the Tools

Compiler: This is the one tool you really need. The others are optional. Easiest way to get MinGW is to download their pre-compiled bundle (MinGW-3.0.0-1.exe). It contains the compiler gcc/g++ together with make and win32 headers.

Environment: MSYS is designed to complement MinGW in that it gives a more complete Unix like environment. Get MSYS-1.0.9.exe if you want this.

CVS client: There are no recent .zip or .tar.gz packages with the K-Meleon source. You are expected to get the latest source out of the versioning system. Best is to use a CVS client for this. For Windows there is WinCvs which is part of the CvsGui project.

2. Install the Tools

MinGW+MSYS: If you will use both MinGW and MSYS you can either first install msys as c:/msys and later mingw as c:/msys/mingw, or you can first install mingw as c:/mingw and, while instaling msys as c:/msys, tell the installation program where to find mingw. (other choices of directories are, of course, also possible)

MinGW: If you will only use MinGW you will have to setup your search %PATH% correctly. Something like:

        set PATH=c:/mingw/bin;%PATH%

will do. Make it a .bat file for the future.

3. Get the Source

If you are happy with coding for the latest release you can download the source from the Download page, otherwise you need to reach the CVS.

To get all source files out of the repository with WinCVS you first set up some preferences.

  • CVSROOT: anonymous@cvs.kmeleon.sourceforge.net:/cvsroot/kmeleon
  • Authentication: "passwd" file on the server

After that you can checkout the module "k-meleon" at a local folder of your choice (maybe c:/src).

4. Compile the Source

You will have to write your own Makefile (or copy and modify an old). Use g++ to compile and dllwrap to turn it into a dll.

There is a simple plugin that doesn't do anything at the KPluginExample page. You can use this Makefile to compile it.

Some plugins use #define's and structures not available in MinGW. Best way to find a full description of them is by searching MSDN. Keep all such additions to a single file, such as missing.h


(c) 2000-2010 kmeleonbrowser.org. All rights reserved.
design by splif.