RobLoach / raylib-nuklear

Nuklear immediate mode GUI for raylib
https://robloach.github.io/raylib-nuklear/
zlib License
141 stars 19 forks source link

Not make #39

Closed milen-prg closed 2 years ago

milen-prg commented 2 years ago

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?

RobLoach commented 2 years ago

It uses cmake, so you should be able to build directly with it. Could you list the whole log?

milen-prg commented 2 years ago

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.

RobLoach commented 2 years ago

Which version of cmake? Seems strange that it won't output a makefile.

RobLoach commented 2 years ago

you could also just bring it into your own application with raylib-nuklear-example.c and raylib-nuklear.h and nukelar.h

milen-prg commented 2 years ago

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.

milen-prg commented 2 years ago

but cmake generated many files in this new build folder:

изображение

RobLoach commented 2 years ago

Do you have Ninja installed? Looks like it output a ninja file.

milen-prg commented 2 years ago

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!!!

ajh123 commented 1 year ago

@milen-prg use cmake .. -G "Unix Makefiles" you need to specify a different generator if you need to use Makefiles.