Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Compile with Mingw #38

Open
NicolasRicard opened this issue Nov 13, 2018 · 4 comments
Open

Compile with Mingw #38

NicolasRicard opened this issue Nov 13, 2018 · 4 comments

Comments

@NicolasRicard
Copy link

NicolasRicard commented Nov 13, 2018

Hello,

Actually, there is too much ifdef _WIN32 in your sources, so it doesn't work.
Even if some may be justified, some of them should be ifdef MSVC

I tried with some changes until I can compile it with mingw, but I had a beautifull error 0x000005 :

Process finished with exit code -1073741819 (0xC0000005)

So I am a litle lost. It happened with this line :

    float* results = noiseSIMD->GetPerlinSet(0, 0, 0, 200, 1, 200);

Originally posted by @NicolasRicard in #37 (comment)

@NicolasRicard NicolasRicard changed the title Hello, Compile with Mingw Nov 13, 2018
@Auburn
Copy link
Owner

Auburn commented Nov 13, 2018

Does it throw an illegal instruction exception?

@NicolasRicard
Copy link
Author

NicolasRicard commented Nov 13, 2018

I didn't catch any, and didn't saw any... it seems to be a pointer error.

image

I'd like to debug this, but I don't know how, or where. I didn't got deep enough in your code to do it without help.

Maybe it happend because I change code to undef _WIN32 in most cases...

@Auburn
Copy link
Owner

Auburn commented Nov 13, 2018

Can you show the full function where you call GetPerlinSet

@NicolasRicard
Copy link
Author

NicolasRicard commented Nov 13, 2018

My code where I start using FastNoiseSIMD is below but my full function is a litle too long yet to show it.

I am in test phase.

    URHO3D_LOGINFO("debug 7");
    {
      std::stringstream ss;
      ss << "FastNoiseSIMD level " << FastNoiseSIMD::GetSIMDLevel();
      std::cout << ss.str() << std::endl;
      URHO3D_LOGINFO(ss.str().c_str());
    }
    FastNoiseSIMD* noiseSIMD = FastNoiseSIMD::NewFastNoiseSIMD(seed);
    noiseSIMD->SetNoiseType(FastNoiseSIMD::NoiseType::Perlin);


    URHO3D_LOGINFO("debug 7.1");
    {
      std::stringstream ss;
      ss << "FastNoiseSIMD level " << (void*) &noiseSIMD->GetPerlinSet;
      std::cout << ss.str() << std::endl;
      URHO3D_LOGINFO(ss.str().c_str());
    }
    float* results = noiseSIMD->GetPerlinSet(0, 0, 0, 200, 1, 200);
    URHO3D_LOGINFO("debug 7.2");

And I get in log files :

[Tue Nov 13 18:51:01 2018] INFO: debug 7
[Tue Nov 13 18:51:01 2018] INFO: FastNoiseSIMD level 3
[Tue Nov 13 18:51:01 2018] INFO: debug 7.1
[Tue Nov 13 18:51:01 2018] INFO: FastNoiseSIMD level 0xd4ca70

PS : A friend of mine asked me to test GetEmptySet and FillPerlinSet separately and it crashed on FillPerlinSet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants