SDK Tools Guides

Home

Creating Projects from Templates

This guide shows you how to create a new application project in the MoSync IDE and describes the project templates that are available to you. It also introduces the concepts of projects and workspaces. We have templates for various types of C/C++ projects, and templates for hybrid HTML/Javascript/C/C++ projects.

Projects and Workspaces

The MoSync IDE is based on Eclipse. Eclipse organizes your source code using projects and workspaces. A workspace is a collection of projects. A project is a collection of a set of source files. Projects can be individual applications or modules, depending on how you choose to organize your workspaces. Each project maps to a corresponding directory in the file system.

The different projects in a workspace may map to different file system directories or drives, although, by default, all projects map to subdirectories of a single workspace directory. All files in the workspace are directly accessible to the standard programs and tools of the underlying operating system.

The Project Explorer view in the IDE shows you all the projects in the current workspace and their source files.

Creating a New Project

In the MoSync IDE, you create a new project by doing one of the following:

  • From the File menu, choose New > Project, or
  • Right-click in the Project Explorer, then choose New > Project

    (If you have hidden the Project Explorer view, you can show it again by selecting Window > Show View > Other > General > Project Explorer and then clicking OK.)

When the New Project window opens, expand the MoSync folder:



In the folder MoSync you will find wizards for creating MoSync projects.

Select the one called MoSync Project.

Click Next. A new window will open showing you the templates that are available for you new project:

Select a template type (C/C++ or HTML5), then select one of the available templates.

Click Next. The project name and location screen appears:



Enter the Project name "HelloWorld". (Note: to ensure compatibility with all platforms and devices, avoid using spaces in project names; it is always safe to use the underscore character.)

Tick the Use default location box.

Click Finish.

Your new project will now be created from the template and loaded in the MoSync IDE.

MoSync Project Templates

We provide you with many different project templates, adapted to meet the needs of various different application types.

All templates have:

  • Default compiler flags for Release configuration: -O2
  • Default compiler flags for Debug configuration: O0
  • Dead code elimination: Off
  • Default library: mastd.lib, if enabled.
TemplateLanguagesDescriptionLibrariesHeap sizeStack sizeData size

HTML5/JS WebUI Project

HTML5, JavaScriptTemplate for HTML5/JS projects that use HTML/CSS for the UI. Access device functionality from JavaScript.mastd.lib, MAUtil.lib, NativeUI.lib, MAFS.lib, Wormhole.lib
yajl.lib
Notification.lib
30725124096

HTML5/JS NativeUI Project

HTML5, JavaScript

Template for HTML5/JS projects that use Native UI. Create the UI in HTML/JavaScript and access device functionality from JavaScript.

mastd.lib, MAUtil.lib, NativeUI.lib, MAFS.lib, Wormhole.lib, yajl.lib, Notification.lib

3072

512

4096

HTML5/JS/C++ Hybrid Project

HTML5, JavaScript, C/C++Template for hybrid HTML5/JS/C++ projects. Extend the application with C/C++ code. Build the UI in HTML/CSS or use NativeUI.mastd.lib, MAUtil.lib, NativeUI.lib, MAFS.lib, Wormhole.lib
yajl.lib
Notification.lib
30725124096

C++ STL Project

C/C++A standard ANSI C++ application template consisting of a main file with a small code example and  includes the C++ Standard Template Library.newlib.lib, stlport.lib15362562048

C++ Moblet Project

C/C++A standard ANSI C++ application template that uses the Moblet event-handling framework.mastd.lib, MAUtil.lib5121281024

C++ NativeUI Project

C/C++A standard ANSI C++ application template that uses the Moblet framework and the NativeUI Library.mastd.lib, MAUtil.lib, NativeUI.lib30725124096

C++ OpenGL Project

C/C++A standard ANSI C++ application template that includes the Moblet framework and basic OpenGL code.mastd.lib, MAUtil.lib30725124096

C Basic Project

CA standard ANSI C project template consisting of a main file with a small code example.mastd.lib5121281024

C NativeUI Project

CA standard ANSI C application template that has its own event loop and uses the Widget API.mastd.lib, MAUtil.lib30725124096

C Newlib Project

CA standard ANSI C application template using the Newlib C library.newlib.lib15362562048

Empty Project

No languagesA project template with standard settings but no files, roll your own.mastd.lib5121281024

MoSync SDK 3.3
Copyright © 2013 MoSync AB
www.mosync.com