Building Nano

Nano is typically built with Xcode 4 for Mac OS X/iOS, and Microsoft Visual C++ Express 2008 for Windows.

Nano is typically built as a stand-alone static library, however this is not required. Nano can also be built by including the relevant source code directly in your project or by building it as a shared library.

Nano's default settings maximize warnings in debug builds and minimize the final binary size in release builds.

Xcode

Configuration

Nano projects contain Debug and Release configurations. These configurations are managed by external .xcconfig files, contained in Support/Xcode/Configuration.

Debug builds are performed for the current architecture while release builds are built as Universal Binaries (32/64-bit Intel and 32-bit PowerPC for Mac OS X, iPhone/iPad for iOS). This behaviour can be adjusting with the ARCHS setting in NanoCommon.xcconfig.

Projects

Nano projects do not apply any settings at the project level, and are customized at the target level. Targets contain minimal customisations, with most values set by .xcconfig files.

Language

If compiling Nano source directly in your project, you will need to apply the correct language settings to individual source files; all source should be built as C++, except those .cpp files which also contain Objective-C.

Unfortunately a bug in Xcode (rdar://5259110) means that the per-file language setting is ignored if the target-level language setting is set to anything other than "by file type".

As such, you will need to set the language setting individually for those files who do not match Xcode's extension-based rules (.c files must be modified to C++, and .cpp files that use Objective-C must be set to Obj-C++).

Visual Studio

Configuration

Nano projects contain Debug and Release configurations. These configurations are managed by external .vsprops files, contained in Support/Visual Studio/Configuration.

Language

Visual Studio must be updated to the Visual C++ 2008 Feature Pack, since NFunctor.h requires an implementation of TR1.