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

noise.h missing for heightmap example #9

Closed
meigel opened this issue Aug 19, 2020 · 2 comments
Closed

noise.h missing for heightmap example #9

meigel opened this issue Aug 19, 2020 · 2 comments

Comments

@meigel
Copy link

meigel commented Aug 19, 2020

Trying to compile 2_Heightmap yields

g++ -std=c++17 main.cpp ../../include/imgui/imgui.cpp ../../include/imgui/imgui_demo.cpp ../../include/imgui/imgui_draw.cpp ../../include/imgui/imgui_widgets.cpp ../../include/imgui/imgui_impl_opengl3.cpp ../../include/imgui/imgui_impl_sdl.cpp -Wfatal-errors -O -I/usr/local/include -L/usr/local/lib -lX11 -lpthread -lSDL2 -lnoise -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lGL -lGLEW -lboost_serialization -lboost_system -lboost_filesystem -o main
In file included from main.cpp:4:0:
model.h:1:10: fatal error: noise/noise.h: No such file or directory
#include "noise/noise.h"
^~~~~~~~~~~~~~~
compilation terminated.

(and as someone mentioned in another issue, -lnoise has to be removed from 5_Particles makefile)

@weigert
Copy link
Owner

weigert commented Aug 19, 2020

Thanks for the issue.

This is a hidden dependency I forgot to include. The heightmap is generated using perlin noise from libnoise. You must install libnoise for the height map generation. You can also remove the dependency by removing that line and the flag in the linker and replacing the height map generation in "model.h" to whatever you like.

To fix, install libnoise: http://libnoise.sourceforge.net/

To workaround, edit "model.h".

If you are on > Ubuntu18, then libnoise is in a slightly different location (see issue here): weigert/territory#15

@meigel
Copy link
Author

meigel commented Aug 20, 2020

Thanks for the hint! Also thanks for this nice little engine!

@meigel meigel closed this as completed Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants