Closed milen-prg closed 2 years ago
It uses cmake, so you should be able to build directly with it. Could you list the whole log?
This is all what I did, using mingw64 bit terminal (MSYS2 Windows 10 Pro 64 bit):
$ git clone https://github.com/RobLoach/raylib-nuklear.git Cloning into 'raylib-nuklear'... remote: Enumerating objects: 372, done. remote: Counting objects: 100% (103/103), done. remote: Compressing objects: 100% (32/32), done. remote: Total 372 (delta 86), reused 77 (delta 70), pack-reused 269 Receiving objects: 100% (372/372), 773.37 KiB | 2.91 MiB/s, done. Resolving deltas: 100% (215/215), done.
$ cd raylib-nuklear/
$ git submodule update --init Submodule 'vendor/nuklear' (https://github.com/Immediate-Mode-UI/Nuklear.git) registered for path 'vendor/nuklear' Cloning into '/home/mlap/raylib-nuklear/vendor/nuklear'... Submodule path 'vendor/nuklear': checked out '11d8acfd4fbb9d0966161fa01d58be15be1974e3'
$ mkdir build $ cd build
$ cmake .. -- Building for: Ninja -- The C compiler identification is GNU 12.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/msys64/mingw64/bin/cc.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Configuring done -- Generating done -- Build files have been written to: C:/msys64/home/mlap/raylib-nuklear/build
$ make make: *** No targets specified and no makefile found. Stop.
Which version of cmake? Seems strange that it won't output a makefile.
you could also just bring it into your own application with raylib-nuklear-example.c and raylib-nuklear.h and nukelar.h
cmake 3.24.2-1
But to use it in my program, may be nuklear must be compiled to static or dynamic library, its source is from many c files.
Sorry I'm not very good with the system part in C, I use it to make some physics simulations.
but cmake generated many files in this new build folder:
Do you have Ninja installed? Looks like it output a ninja file.
Yes, in projects in VSCode IDE, Nunja is set as generator for CMake and this works fine.
But, now I simply opened one of my raylib C projects, simply add your files: raylib-nuklear.h nuklear.h
and for main.c use your raylib-nuklear-example.c
And it runs just fine! All works! I did not understand what must build, but just adding of this two headers to my project, successfully compiles and adds Nuklear GUI. Now will have beautiful gui for my programs, thank you!!!
@milen-prg use cmake .. -G "Unix Makefiles"
you need to specify a different generator if you need to use Makefiles.
After strict following the installation instructions, the make command did not executes: returns message:
make: *** No targets specified and no makefile found. Stop.
Can help me, what do wrong?