Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to start the examples on MacOS 15... #180

Open
dfms opened this issue Jan 29, 2025 · 4 comments
Open

Trying to start the examples on MacOS 15... #180

dfms opened this issue Jan 29, 2025 · 4 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@dfms
Copy link

dfms commented Jan 29, 2025

Hi all,

I am trying to start the examples from the source code on Mac OS 15.2 with Xcode 16.2 installed and CMake 3.31.4.
The thing is that when I run the configuration from CMake I get an error that I show in the screenshots.

What configuration should I include in CMake to make it work? What am I doing wrong?

The C compiler works correctly (see CodeRunner screen)

Image

Image

@frang75
Copy link
Owner

frang75 commented Jan 29, 2025

Hi!

Where is the source code: /Users/david/nappgui_src
Where to build the binaries: /Users/david/nappgui_src/build (or other)

You cannot build subprojects directly.

@dfms
Copy link
Author

dfms commented Jan 29, 2025

Yes! Fantastic! ... It works perfectly. Sorry for my clumsy configuration of CMake.

@frang75 frang75 self-assigned this Jan 29, 2025
@frang75 frang75 added the help wanted Extra attention is needed label Jan 29, 2025
@dfms
Copy link
Author

dfms commented Feb 1, 2025

Hi,

OK, I have managed to compile and launch the demos from source.

Now I try to make a new project from scratch and do the following: I start CMake, set the source path for the binaries (empty folder) and the nappgui path, and generate the project for XCode. I open the project and everything is fine. I run it and it compiles correctly.

Now comes doubt. I create a new group (folder) in the XCode project and create a new C file from the templates. This generates an .h and a .c. In the .c file I copy and paste the code from the ‘Hello world’ tutorial from the NappGUI website.

I compile without errors but the screen does not appear. What steps am I missing?

Regards,
David

@frang75
Copy link
Owner

frang75 commented Feb 3, 2025

Creating a new Apple Desktop Bundle is a bit more complicated than just adding a C file to Xcode. However, you should not edit the Xcode project directly, as it has been generated by CMake and will be overwritten by the next CMake run.

If you want to learn and practice with NAppGUI, simply edit any example application. For example, editing /demo/hello/main.c will modify Hello World. There are a number of applications to practice with.

On the other hand, if you want to seriously start developing a new application, you should do so outside of the NAppGUI project directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants