This page has been automatically translated using the Google Translate API services. We are working on improving texts. Thank you for your understanding and patience.
"...the number of UNIX installations has grown to 10, with more expected..." Dennis Ritchie and Ken Thompson - June 1972
NAppGUI is an SDK to develop software projects using the C programming language, that work on any desktop platform (Windows, macOS or Linux) (Figure 1). C++ is allowed, but not indispensable. We can write a complete program using only ANSI-C.
Before start you need to have installed these tools (Figure 2):
- Visual Studio 2019 to compile under Windows. Microsoft offers the free Community version for independent developers or small companies.
- CMake. Cross-platform tool to automatically create build projects from the source code.
All you have to do is unzip the .zip file with the latest version or clone the GitHub repository. In it are the four folders that will make up your local working copy (Figure 3). We will assume that they are located in the
- inc: SDK header files.
- lib: Pre-compiled versions of the NAppGUI libraries.
- prj: Scripts that CMake will use to generate the projects.
- src: Source code of the examples and future location of your own projects.
3. Compile the examples
We will create a solution in Visual Studio and compile one of the sample applications.
- Open CMake (Figure 5).
- Where is the source code:
- Where to build the binaries:
C:\nappgui_build. This new directory is generated automatically and must be out of version control.
[Configure]. CMake will ask for the compiler version. We use Visual Studio 2019 (Figure 4).
[Generate](Figure 5). The solution
NAppGUI.slnwill be created in
[Open Project]to open the solution in Visual Studio.
- Already inside Visual Studio,
- Right click on
demo/Productsin the Solution Explorer and
Set as StartUp Project.
- We can now debug the example application
We recommend that you spend some time browsing, compiling and testing the examples.
4. Create a new project
To create a new desktop application, open the file
src/CMakeLists.txt of your working copy. Go to the end of the file and add this line:
# Your projects here! desktopApp("MyApp" "myapps/myapp" "" NRC_EMBEDDED)
[Generate] in CMake, which will create the project in
/src/myapps/myapp (Figure 7). Visual Studio will detect the changes and import the new project. It is ready to compile and run (Figure 8).
You can locate the projects at any depth level within
/src. Paths like
"mygame"are perfectly valid.
5. And now what?
- In Welcome to NAppGUI we continue with a detailed tutorial.
- In Products you have more details about the sample application you have run.
- In New project you will see how to add files and resources to projects.
- In Portability we will give detailed information on migration and cross-platform compilation.
- In SDK reference you have the complete documentation of the libraries and functions.