Jump to content
  • Advertisement
Sign in to follow this  
Panzer3133

Libnoise - please help

This topic is 3380 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I downloaded a library called Libnoise that generates coherent noise. It can be used for landscapes, which is why I downloaded it. You can download it here: libnoise.sourceforge.net Anyways, I'm using Microsoft Visual Studio 2008. When I tried to compile the following code, #include "stdafx.h" #include <iostream> #include <noise.h> using namespace noise; int main (int argc, char** argv) { module::Perlin myModule; double value = myModule.GetValue (1.25, 0.75, 0.50); std::cout << value << std::endl; return 0; } I get the following errors: test2.obj : error LNK2019: unresolved external symbol "public: virtual double __thiscall noise::module::Perlin::GetValue(double,double,double)const " (?GetValue@Perlin@module@noise@@UBENNNN@Z) referenced in function _main test2.obj : error LNK2019: unresolved external symbol "public: __thiscall noise::module::Perlin::Perlin(void)" (??0Perlin@module@noise@@QAE@XZ) referenced in function _main test2.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall noise::module::Module::~Module(void)" (??1Module@module@noise@@UAE@XZ) referenced in function "public: virtual __thiscall noise::module::Perlin::~Perlin(void)" (??1Perlin@module@noise@@UAE@XZ) I know I correctly linked all the directories. I've looked on other sites, and found no answer. I also made threads on all the other sides and nobody replied. Can somebody please help me with this? Thank you, it's very much appreciated.

Share this post


Link to post
Share on other sites
Advertisement
It's in the correct directory. Everything is. I made sure to link everything. Just in case, the I would link the DLL under Library files, right?

Share this post


Link to post
Share on other sites
Edit:

add the libnoise.lib to your Linker\Input\Additional Dependencies, with full path if needed.

Share this post


Link to post
Share on other sites
I didn't know whether to start another thread, so I'll revive this one. I've run into another problem when I added two more files to the Compiler's include directory: noiseutils.h and noiseutils.cpp. I'm getting the same type of error as above, but there isn't any library to include.

libnoise.obj : error LNK2019: unresolved external symbol "public: __thiscall noise::utils::NoiseMap::~NoiseMap(void)" (??1NoiseMap@utils@noise@@QAE@XZ) referenced in function _main

libnoise.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall noise::utils::NoiseMapBuilderPlane::Build(void)" (?Build@NoiseMapBuilderPlane@utils@noise@@UAEXXZ) referenced in function _main

libnoise.obj : error LNK2019: unresolved external symbol "public: __thiscall noise::utils::NoiseMapBuilderPlane::NoiseMapBuilderPlane(void)" (??0NoiseMapBuilderPlane@utils@noise@@QAE@XZ) referenced in function _main

libnoise.obj : error LNK2019: unresolved external symbol "public: __thiscall noise::utils::NoiseMap::NoiseMap(void)" (??0NoiseMap@utils@noise@@QAE@XZ) referenced in function _main

Any suggestions?

Share this post


Link to post
Share on other sites
Quote:
Original post by Panzer3133
...I added two more files to the Compiler's include directory: noiseutils.h and noiseutils.cpp.

Um, i don't think you should have a cpp in the include directory. The LibNoise documentation (assuming there is some) should tell you what .lib files to include and what header files to include.

Share this post


Link to post
Share on other sites
Quote:
Original post by XTAL256
Quote:
Original post by Panzer3133
...I added two more files to the Compiler's include directory: noiseutils.h and noiseutils.cpp.

Um, i don't think you should have a cpp in the include directory. The LibNoise documentation (assuming there is some) should tell you what .lib files to include and what header files to include.


Whoops, my mistake. I meant to say that I've linked everything correctly. And there is barely any documentation.

Share this post


Link to post
Share on other sites
You said that you moved the cpp file in the include directory, but do you actually compile it as well? Because that is what those linker errors along with your description tell me.

Share this post


Link to post
Share on other sites
Quote:
Original post by Panzer3133
there is barely any documentation.

Wow. I found libNoise to be uncommonly well documented, personally.

IIRC noiseutils isn't built into the dll, so you'll have to build it yourself. The simplest way to do this is to add the files to your project in msvc.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!