SDK for building cross-platform desktop apps in ANSI-C

NAppGUI

Cross-Platform C SDK. Build portable desktop applications for Windows, macOS and Linux, using just C.

NAppGUI Stack

Quick start in Windows

Prerequisites

Open the Developer Command Prompt

(from C:\)

// Clone the NAppGUI repo
git clone --depth 1 https://github.com/frang75/nappgui_src.git nappgui_sdk

// Create a build directory
mkdir nappgui_build
cd nappgui_build

// Generate the Visual Studio Solution
cmake -G "Visual Studio 16 2019" ../nappgui_sdk/src

// Build the examples
msbuild NAppGUI.sln

// Run examples in 'demo' and 'howto' folders
.\demo\die\Debug\Die.exe
.\demo\bricks\Debug\Bricks.exe
.\demo\products\Debug\Products.exe
.\howto\col2dhello\Debug\Col2dHello.exe
.\howto\guihello\Debug\GuiHello.exe
...

Running demo project in Windows

Quick start in macOS

Prerequisites

Open the Terminal

(from your home dir ~/)

// Clone the NAppGUI repo
git clone --depth 1 https://github.com/frang75/nappgui_src.git nappgui_sdk

// Create a build directory
mkdir nappgui_build
cd nappgui_build

// Generate the Xcode project
cmake -G "Xcode" ../nappgui_sdk/src

// Build the examples
xcodebuild

// Run examples in 'demo' and 'howto' folders
./demo/die/Debug/Die.app/Contents/MacOS/Die
./demo/bricks/Debug/Bricks.app/Contents/MacOS/Bricks
./demo/products/Debug/Products.app/Contents/MacOS/Products
./howto/col2dhello/Debug/Col2dHello.app/Contents/MacOS/Col2dHello
./howto/guihello/Debug/GuiHello.app/Contents/MacOS/GuiHello
...

Running demo project in macOS

Quick start in Linux

Prerequisites

// Development tools
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install git
sudo apt-get install make
sudo apt-get install cmake

// Development libraries
sudo apt-get install libgtk-3-dev
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
sudo apt-get install libcurl4-openssl-dev

Open the Terminal

(from your home dir ~/)

// Clone the NAppGUI repo
git clone --depth 1 https://github.com/frang75/nappgui_src.git nappgui_sdk

// Create a build directory
mkdir nappgui_build
cd nappgui_build

// Generate the Makefiles
cmake -G "Unix Makefiles" ../nappgui_sdk/src

// Build the examples
make

// Run examples in 'demo' and 'howto' folders
./demo/die/Debug/Die
./demo/bricks/Debug/Bricks
./demo/products/Debug/Products
./howto/col2dhello/Debug/Col2dHello
./howto/guihello/Debug/GuiHello
...

Running demo project in Linux

More info

Owner
Francisco García Collado
Lead developer at NAppGUI Cross-Platform C SDK.
Francisco García Collado
Comments
  • Applications not sized correctly Ubuntu 18.04.

    Applications not sized correctly Ubuntu 18.04.

    For example the hello demo app only displays the title bar. Build from source is successful. I am surprised the application can not be resized/maximised either. Otherwise nice job Screenshot from 2022-04-10 18 57 11 Screenshot from 2022-04-10 18 57 50 !

  • [BUG] gifs are not played on linux

    [BUG] gifs are not played on linux

    https://user-images.githubusercontent.com/51754973/158998704-7f902b87-d582-4395-b90d-7d07c83aaac7.mp4

    tested on linux mint and arch linux. this is the binary that is downloaded here:https://nappgui.com/en/download/download.html I also compiled the library on my system with gcc 11 and it has the same issue.

  • Build errors with CMake >= 3.21.2

    Build errors with CMake >= 3.21.2

    Hello! I'm excited to try this library out, but can't get the demos to build on my macOS system.

    I followed the macOS quick start instructions here. First, I get the CMake output as shown in this gist. Looks fine aside from the upfront warning about the CMake version (I'm using the latest 3.21.2).

    Then, running xcodebuild, I get the output in this other gist, with the first error shown on line 615.

    Error seems to emanate from draw2d_osx.ixx.

    Unfortunately, I'm not much of a macOS developer, so I'm not sure how one would even go about correcting this! (I guess I need to learn 😄)

    Thanks for any help on this!

  • right Shift + Tab doesnt move focus to previous control

    right Shift + Tab doesnt move focus to previous control

    Tested on windows 10, If I press the left side Shift + Tab the focus does move to previous control but shouldn't right side shift + Tab mimic the same, right now it's just moving to next element like as if right shift isn't pressed at all.

  • fseek, ftell?

    fseek, ftell?

    From my point of view it's a very good idea to also include basic features in NAppGUI usually found in the C standard library to avoid compiler/platform dependencies.

    But I didn't find fseek nor ftell (or similar functionality), neither in Osbs nor in Core. Can you give me a hint please how I'm supposed to set a file position using NAppGUI?

  • Not able to make the Xcode project

    Not able to make the Xcode project

    Hi there... trying quickly I get this error:

    MBP:nappgui_build oldes$ cmake -G "Xcode" ../nappgui_sdk/src
    -- The C compiler identification is AppleClang 11.0.0.11000033
    -- The CXX compiler identification is AppleClang 11.0.0.11000033
    -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
    -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - failed
    -- Detecting C compile features
    -- Detecting C compile features - failed
    -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
    -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- broken
    CMake Error at /usr/local/Cellar/cmake/3.9.5/share/cmake/Modules/CMakeTestCXXCompiler.cmake:44 (message):
      The C++ compiler
      "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
      is not able to compile a simple test program.
    
      It fails with the following output:
    
       Change Dir: /Users/oldes/GIT/nappgui_build/CMakeFiles/CMakeTmp
    
      
    
      Run Build Command:"/usr/bin/xcodebuild" "-project"
      "CMAKE_TRY_COMPILE.xcodeproj" "build" "-target" "cmTC_cb4fb"
      "-configuration" "Debug"
    
      note: Using new build system
    
      2021-09-09 23:00:33.422 xcodebuild[33634:1747991] unable to create build
      operation: Error Domain=com.apple.xcbuild Code=1 "unknown error while
      handling message: missingTarget(guid:
      "1aba590e2e5c6a1873bb5978a646d793204a9ea3f8464f305b840440404ef12c")"
      UserInfo={NSLocalizedDescription=unknown error while handling message:
      missingTarget(guid:
      "1aba590e2e5c6a1873bb5978a646d793204a9ea3f8464f305b840440404ef12c")}
    
      
    
      ** BUILD FAILED **
    
    MBP:nappgui_build oldes$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ --version
    Apple clang version 11.0.0 (clang-1100.0.33.8)
    Target: x86_64-apple-darwin18.7.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    
    MBP:nappgui_build oldes$ xcodebuild -version
    Xcode 11.0
    Build version 11A420a
    
  • Fix xcode compiling big sur binary for catalina with Xcode <= 12.4

    Fix xcode compiling big sur binary for catalina with Xcode <= 12.4

    Hi

    This project looks truly incredible! i am baffled how you only have 195 stars, when that's said, thanks for making nappgui ❤️

    I stumbled upon this minor issue while building the project on macOS Catalina. Apple has gotten less consistent when it comes to removing support for Xcode, ie. not only at major increments... as such you can actually use Xcode 12 on Catalina up to 12.4, which this PR reflects.

    The "sw_vers" command has existed for all of mac os x lifetime, so it should be compatible with all mac os versions nappgui supports

  • Simplify warning suppression enable Ninja on WIN32

    Simplify warning suppression enable Ninja on WIN32

    I propose changing the visual C++ warnings into a CMAKE list for easier maintenance. A side effect of this is that Ninja builds for CI can be integrated.

    Documentation for the Ninja build

    // Batch build using Ninja build tool (VS 2022)
    // Generate the build
    cmake -DCMAKE_VS_PLATFORM_TOOLSET=v143 -G "Ninja" ../nappgui_sdk/src
    
    // Build the examples
    ninja
    
  • Any Database Support Like SQLite?

    Any Database Support Like SQLite?

    Greetings! I'm kindly asking that does NAPPGUI has any support for common databases like SQLite, MySQL, MSSQL Server and others? If so, how to connect to them and do CRUD?

    Thanks

  • I am getting issues compiling my source code on ubuntu 22.X

    I am getting issues compiling my source code on ubuntu 22.X

    hi @frang75 I am getting this is on ubuntu how I fix it : usr/bin/ld: /home/parallels/nappgui_sdk/lib/gcc11_gtk3_x64/Debug/libsewer.a(bmath.cpp.o): undefined reference to symbol '[email protected]@GLIBC_2.29' /usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [demo/hello/CMakeFiles/HelloWorld.dir/build.make:111: demo/hello/Debug/HelloWorld] Error 1 make[1]: *** [CMakeFiles/Makefile2:358: demo/hello/CMakeFiles/HelloWorld.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 Screenshot 2022-12-20 at 8 05 08 PM

  • create ip address window.

    create ip address window.

    how I limit the numbers of each field class of 4 edit box and focus between them each time I enter the 3 numbers of the ip address I will send a image to be more clear and thanks for your time . Screenshot 2022-12-16 at 5 48 32 PM

    the solution thanks to @frang75 👍 : IP_Linux IP_macOS IP_Windows

    To download the files -> https://github.com/lbhack/ipfocus

  • How to working with the third-party static library(Ex: libusb-1.0.lib)

    How to working with the third-party static library(Ex: libusb-1.0.lib)

    Hello Frang: I'm new to NAppGUI and CMake. about below question I can't find any answer on Google.
    When add new project by command "desktopApp("TestUSB" "Ben/TestUSB" "" NRC_NONE)", and add the "target_link_libraries(TestUSB usb-1.0)" to CMakeLists.txt file on my new project folder , but this file will be updated automatic every time when CMake configure. How does the best way the NAppGUI working with a third-party library (Example; libusb-1.0.lib libusb-1.0.a ), if I don't want re-compiler the third-party library source code?

  • Modal Window Close Crash.

    Modal Window Close Crash.

    Hello,

    First thing I would like to mention, I really enjoy this library! Imo, easy to grasp and not really bloated like other libraries I've used prior.

    I've came across an issue on Windows. Whenever I would close a second window, using the [X] on the title bar, it would crash the whole program. After looking into the debug, it crashes at the strcmp between "bool_t" and an unknown value with "0x3f3f3f3f3f3f3f3f", and looking even more back the event->return_type inside event_result_imp() is also set to "0x3f3f3f3f3f3f3f3f".

    The good news, if I were to not use the [X] on the title bar, It wouldn't crash (eg. a push button, set to destroy the modal window).

    I have modified the "HelloWorld" main.c files to show you what I've encountered. I made sure that I did a fresh compilation of nappgui before sending this issue (using vs2022): win32_modal_crash.zip

    I also sent two pics (the actual modal window in where it would crash, and the event_result_imp 0x3f3f.) Hopefully this crash is easily replicated on your end. [Or hopefully this is just my machine and everything is truly ok, that works too lol]

The Gecko SDK (GSDK) combines all Silicon Labs 32-bit IoT product software development kits (SDKs) based on Gecko Platform into a single, integrated SDK.

Silicon Labs Gecko SDK (GSDK) The Gecko SDK (GSDK) combines Silicon Labs wireless software development kits (SDKs) and Gecko Platform into a single, i

Dec 28, 2022
This plugin allows Flutter desktop apps to defines system tray.

tray_manager This plugin allows Flutter desktop apps to defines system tray. tray_manager Platform Support Quick Start Installation ⚠️ Linux requireme

Dec 22, 2022
This plugin allows Flutter desktop apps to Auto launch on startup / login.

This plugin allows Flutter desktop apps to Auto launch on startup / login.

Dec 18, 2022
This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut).

hotkey_manager This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut). hotkey_manager Platform Support Quick Star

Jan 6, 2023
A set of very empty header files that can be used when building apps with Cosmopolitan

cosmo-include A set of very empty header files that can be used when building apps with Cosmopolitan Why? When you build an application with Cosmopoli

Dec 21, 2022
A framework for building native Windows apps with React.
A framework for building native Windows apps with React.

React Native for Windows Build native Windows apps with React. See the official React Native website for an introduction to React Native. React Native

Jan 2, 2023
Appupdater is a C++ cross-platform framework to update desktop software (gitlab mirror)

appupdater is a C++ cross-platform framework to update desktop software. How it works Framework checks the URL you specified for info about versions a

Jan 8, 2022
A framework for building Mobile cross-platform UI

Weex A framework for building Mobile cross-platform UI. Distribution Support Android 4.1 (API 16), iOS 9.0+ and WebKit 534.30+. platform status Androi

Jan 9, 2023
POCO C++ Libraries are powerful cross-platform C++ libraries for building network
POCO C++ Libraries are powerful cross-platform C++ libraries for building network

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.

Jan 1, 2023
First open-source Geometry Dash cross-platform Modding SDK

BoolkaSDK First open-source Geometry Dash cross-platform Modding SDK Requirements CMake 3.21 Android NDK r23 LLVM x86 Java and ApkTool Building Open C

Nov 20, 2022
The Raspberry Pi Pico SDK (henceforth the SDK) provides the headers, libraries and build system necessary

The Raspberry Pi Pico SDK (henceforth the SDK) provides the headers, libraries and build system necessary to write programs for the RP2040-based devices such as the Raspberry Pi Pico in C, C++ or assembly language.

Jan 5, 2023
Run statically-compiled WebAssembly apps on any embedded platform
Run statically-compiled WebAssembly apps on any embedded platform

embedded-wasm-apps Run native, statically-compiled apps on any platform, using WebAssembly. Examples include AssemblyScript, Rust, C/C++, TinyGo, Zig,

Dec 20, 2022
The Leap Motion cross-format, cross-platform declarative serialization library

Introduction to LeapSerial LeapSerial is a cross-format, declarative, serialization and deserialization library written and maintained by Leap Motion.

Jan 17, 2022
A cross platform shader language with multi-threaded offline compilation or platform shader source code generation
A cross platform shader language with multi-threaded offline compilation or platform shader source code generation

A cross platform shader language with multi-threaded offline compilation or platform shader source code generation. Output json reflection info and c++ header with your shaders structs, fx-like techniques and compile time branch evaluation via (uber-shader) "permutations".

Dec 14, 2022
Semantic version library written in ANSI C

semver.c Semantic version v2.0 parser and render written in ANSI C with zero dependencies. Features Standard compliant (otherwise, open an issue) Vers

Nov 28, 2022
Espressif ESP32 implementation of ANSI-ESTA E1.11 DMX-512A

This library allows for transmitting and receiving ANSI-ESTA E1.11 DMX-512A using an Espressif ESP32. It provides control and analysis of the packet configuration and allows the user to read synchronously or asynchronously from the DMX bus. This library also includes tools for data error-checking to safely process DMX commands.

Jan 9, 2023
ASMotor is a portable and generic assembler engine and development system written in ANSI C99

ASMotor is a portable and generic assembler engine and development system written in ANSI C99 and licensed under the GNU Public License v3. The package consists of the assembler, the librarian and the linker. It can be used as either a cross or native development system.

Nov 18, 2022
My ANSI C solutions for Advent of Code.

ansi-adventure My optimized ANSI C solutions for Advent of Code. I tried favoring speed and performance the most here than most advent of code repos.

Dec 12, 2021
an implementation of the ansi c standard library that makes sense when ur stoned, tired, or otherwise inebriated

eli5 c stdlib an implementation of the ansi* c standard library that makes sense when ur stoned, tired, or otherwise inebriated * apparently this (htt

Oct 13, 2021