nanovg icon indicating copy to clipboard operation
nanovg copied to clipboard

Makefile

Open letarg0 opened this issue 6 years ago • 3 comments

Where is makefile? how compilig demo example?

letarg0 avatar Feb 13 '19 15:02 letarg0

this is what worked for my project clang $(wildcard *.c */*.a) -o out `pkg-config --static --libs glfw3` -lGL Of course, don't forget to link your libnanovg.a file to your project, I personally do so in the wildcard.

ghost avatar Feb 14 '19 05:02 ghost

You use premake [1] to make build files for your specific system. If you want Makefile, then:

premake4 gmake
cd build
make

To use the lib in your project, just copy over the files from src.

[1] https://premake.github.io/

memononen avatar Feb 14 '19 09:02 memononen

bash: premake4: command not found ok, please add info to readme, this is not standard tools

if generate Makefile using premake, on mac i have glfw instaled trought brew.

Linking example_gl3
ld: library not found for -lglfw3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [example_gl3] Error 1
==== Building nanovg (debug_native) ====
==== Building example_gl2 (debug_native) ====
Linking example_gl2
ld: library not found for -lglfw3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [example_gl2] Error 1
make: *** [example_gl2] Error 2

when changed glfw3 to glfw compiling .... but not working gui. Any animation working. Any widgets not working.

letarg0 avatar Feb 15 '19 12:02 letarg0