Skip to content

Compiling on Windows

Evan Teran edited this page Feb 4, 2019 · 14 revisions

nedit-ng is generally coded to maximally source portable. Since the tools can be acquired for free, this walkthrough will involve the following dependencies:

Dependency Version Recommended
Visual Studio >= 2017 Community Edition
Qt Creator >= 5.9
Boost (Headers Only) >= 1.35
CMake >= 3.0

The boost requirement is header only, so you should only need to place the headers in a known location. I installed them into C:\Libraries\boost_1_68_0\

When installing Qt, make sure that the proper version of Qt's library are installed. For me, they are "msvc2017_64" and were installed in C:\Qt.


Once the build dependencies are all installed, and you have either downloaded the source for nedit-ng or clone the repo from git, you can open Qt creator.

  • Select the File Menu
  • Choose Open File or Project
  • Browse to the directory containing the nedit-ng source code, and select CMakeLists.txt
  • You will see a "Configure Project" screen, which should offer some options similar to "Desktop Qt 5.9.7 MSVC2017 64-bit", the defaults are typically fine, so you can select "Configure Project" on the lower right.

Configure Project

  • If you don't see options with "MSVC2017" in them, then Qt Creator did not find Visual Studio's compiler toolchain properly.
  • It is likely that Qt Creator will immediately try to run cmake, and will run into some errors regarding boost. These are fine for now...
  • In the vertical panel on left side of the screen, click the Projects button.

Projects

  • You should then see a "Build Settings" screen, which will allow you to tell Qt Creator what extra cmake variables to set.

  • Click on "Add" and choose "Directory".

Add

  • A new " option will be added to the top of the Key/Value list.

Unset

  • Unfortunately, the UI is a little quirky so follow this part carefully.
  1. Double click on the <UNSET> key (the left one) and type "BOOST_ROOT" and then hit enter.
  2. Double click on the <UNSET> value (the right one) and type the path to where boost in installed (ex. C:\Libraries\boost_1_68_0\ and then hit enter.
  3. then click "Apply Configuration Changes"

NOTE: a failure to hit enter, will cause it to not "lock in" what you typed.

At this point, the environment should be set up correctly. You may click on the Edit button on the left toolbar, build with Ctrl+Shift+B, and run with F5.

  • You may get a message about "CMake configuration has changed on disk", it doesn't seem to matter which option you choose. It seems to just be a difference of forward-slashes vs. backslashes.

NOTE: When running outside of the build environment, the nedit-ng.exe binary will need to have its dependant Qt DLLs copied to the same directory.

Clone this wiki locally