How to port NEdit on MS Windows:

The aim of this page is to provide basic information on how to port NEdit to Windows, where porting means compiling from sources and running.
Notice, that there is no need to read this, if you only want to run NEdit on MS Windows. In this case all you need is an X server and to download the installation package. The information given here is useful, if you need to, or want to, compile NEdit from its sources yourself. So, this text is somewhat more directed to the expert.


To start with, the NEdit port under Microsoft Windows is not a native port in the Windows environment. NEdit doesn't use the Windows GUI API. If you think, only native ports are the real things, please notice that this port gives you one advantage: NEdit will be exactly the same as it is on Unix. There is not the slightest difference whatsoever between this NEdit port and an NEdit binary on Unix (linked to LessTif, since this port must be linked to LessTif because of a license issue).

Requirements for Porting

The Cygwin environment: The Cygwin project consists in porting the GNU tools and utilities to Windows. The Cygwin library provides a UNIX-like API on top of the Win32 API.
Go to the cygwin site in order to read more and to download it from one of their ftp mirrors. Notice, that the installation process is automated. I don't explain it further, because this might be due to changes. You don't need everything from Cygwin, but make sure, that you get at least all the tools described at Build & Install. Moreover, in order to run NEdit in a fully functional way, you need to get ash and tcsh.

X libraries and headers: In order to compile NEdit, you only need the X libraries and headers. I have put up them here. These are part of the Xfree port for Cygwin, which is included in the Cygwin distribution. This means you can also install these libraries and headers from Cygwin. Notice that for running NEdit you will need an X server for Windows. You can use any working X server. Here is a link for almost all about X.
If you want to run the Xfree server, you have to install it with Cygwin. In this case make sure to get the headers of the X libraries. Since they are not required for running applications, they are usually in an optional package.

LessTif: Although it will take some time, I recommend to get the LessTif sources and build them with ./configure and make. Although you may find LessTif packages pre-built for Cygwin, it may not be clear with what Cygwin and Xfree libraries they were built, so it is safer to build it yourself. Notice that there have been some incompatibilities between NEdit and LessTif in the past. Moreover, you can never know what happens tomorrow, so read about what Lesstif version is good for NEdit, first! Then, go to the download page and also check out the building requirements at the LessTif pages.

If you have installed the above packages on your system, you are ready for compiling.

Compiling NEdit

When installing Cygwin, a home directory is set up for you, where you logon when you invoke bash. Get the NEdit sources and unpack them to this directory for compiling. Before compiling, you have to edit Makefile.cygwin in the makefiles folder appropriately. To make it easy, here is an example. Moreover, you may consider to change the default names for NEdit's preference file and the default shell, see below.
Now you are ready to invoke bash and to cd to the NEdit folder. Then simply type in make cygwin, that's all.
For more detailed information about compiling NEdit, cf. Build & Install.

Running NEdit

After compiling, you have the two binaries nc.exe and nedit.exe, where nc.exe is the so-called NEdit client. It is advisable to run NEdit through this client. First, move these binaries to the /usr/X11R6/bin folder. Before running NEdit, some environment variables have to be set. Although this variables could be set globally, I set them locally in a start up script. For a better integration into Windows, e.g., assigning file extensions to NEdit, you will have to use this script. Read it for details, you may need the file XKeysymDB, too. In order to assign NEdit to file extension, use the command (omitting path names):
If you want to send unassociated files to NEdit, here is a batch file (needs the above script) that you can make a link to from your send-to folder.

Final Notes


Great thanks goes to Christian Denat, long-time webmaster of, who started this NEdit port. Without his idea and effort the whole stuff wouldn't be here.