-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Issues Using on Windows #117
Comments
You should use either -lFastNoise or -lFastNoiseD (debug) not both. Your library link folder also looks wrong it should be -LC:\Users\hilfu\Desktop\Code\minecraft-opengl\dependencies\library_windows |
Thank-you for the input! I have gotten rid of the debug file and fixed the link library folder so it only uses backslashes now, however I seem to still be getting the same undefined reference errors. I also tried forward slashes with no luck. Here is how the command looks now:
In case it may help I've also dropped here the full error stack as a txt file when running the command. Thank-you for your help. |
I assume you are using minGW? I don't think MSVC compiled libs are compatible with MinGW |
That should work, you will have to use Clang++ outside of MinGW in order to be ABI compatible with the FastNoise2 libs. Alternatively you could compile FastNoise2 libs yourself for Clang on MinGW if you do want to go that route. GCC MinGW is not supported: #69 |
Thanks for the suggestion to compile on MinGW! It looks like it worked, I have some other errors in my code but I don't seem to be getting any undefined reference errors anymore, once I get my program fully working shortly and fix these seemingly unrelated errors I'll confirm it definitely worked. I actually tried to compile the source before using the wiki, but I only noticed now by default it was compiling for Visual Studio (and thus likely for MSVC)! I used this command so it uses the GCC and G++ compilers/MinGW, and was able to get it to work for the project setup portion:
It may be useful to add a note to this wiki page (linked here) that you'll need to add Thanks for your help again! |
When using CMake with a single config generator like MinGW you need to specify -D CMAKE_BUILD_TYPE=Release at the CMake generate stage (before you build). Make sure you clear out the CMake generated build folder before switching compilers/configs |
Thanks, I don't think you can PR stuff for the wiki, it's not part of the repo |
Hello! I have been trying to get FastNoise2 to work on Windows but am new to the C++ build process - I have been able to get it to successfully work on MacOS. Please let me know if my question is better asked on Discord or elsewhere. Currently I have been trying to use VSCode's build tools with FastNoise's precompiled binaries for Clang. The build tools as I have them setup generate this command that runs to build the executable:
g++ -std=c++17 -fdiagnostics-color=always -g -IC:\Users\hilfu\Desktop\Code\minecraft-opengl/dependencies/include -LC:\Users\hilfu\Desktop\Code\minecraft-opengl/dependencies/library_windows C:\Users\hilfu\Desktop\Code\minecraft-opengl/dependencies/library_windows/FastNoise.lib C:\Users\hilfu\Desktop\Code\minecraft-opengl/*.cpp C:\Users\hilfu\Desktop\Code\minecraft-opengl/glad.c -lglfw3dll -lFastNoise -lFastNoiseD -o C:\Users\hilfu\Desktop\Code\minecraft-opengl/app
However, this fails with many undefined reference errors, making me think the dlls or .lib files are not linking correctly:
C:/Users/hilfu/Desktop/Code/minecraft-opengl/dependencies/include/FastNoise/FastNoise.h:34: undefined reference to FastNoise::Add* FastSIMD::New<FastNoise::Add>(FastSIMD::eLevel, void* (*)(unsigned long long, unsigned long long))'
For reference, attached below is an image of my current file structure. I have also tried using the clang++ compiler instead of g++, but got different errors (which if needed I can try to reproduce again and attach here). If there is any additional information needed to help resolve this, or if there is anything obvious I missed in my inexperience, please let me know. I am hoping I won't have to use FastNoiseLite just for windows!
The text was updated successfully, but these errors were encountered: