dalerank / nanogui-sdl

Minimalistic port of NanoGUI claim works with SDL API w/o external dependencies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Documentation request and/or installation bug

mike-1-2-3 opened this issue · comments

commented

I've been trying to use this library with no success. My attempts are shown here:
https://www.linuxquestions.org/questions/programming-9/difficulties-installing-a-c-library-properly-4175584687/
It would be very helpful if the exact installation commands and the command used to compile your own code with g++ were included. The examples compile correctly after running cmake and make, but I can't find a command to make them compile afterwards. Thanks!

commented

I've gotten it to work. If I compile in /usr/local/src, then I need to run:
g++ example2.cpp -std=gnu++11 sdl2-config --cflags --libs -I/usr/local/src/nanogui-sdl -I/usr/local/src/nanogui-sdl/ext/eigen/ -DEIGEN_DONT_ALIGN -L/usr/local/src/nanogui-sdl -lnanogui
to compile. The -DEIGEN_DONT_ALIGN flag was the tricky part to figure out. And then to run the executable I need to:
export LD_LIBRARY_PATH=/usr/local/src/nanogui-sdl

It might be a good idea to add this to the readme as an example, or maybe just note that you may need to use the -DEIGEN_DONT_ALIGN flag on Linux.

redesigned. try now