Sign in to follow this  

Libnoise - please help

This topic is 3194 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
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
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
Yeah, VS won't compile anything that isn't part of your project -- putting source files in "include" directories won't do a damn thing (and well it should not). You need to add them to your .vcproj.

Share this post


Link to post
Share on other sites

This topic is 3194 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this