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

Compiling for Windows with Either Cygwin or Visual Studio? #17

Open
PlutonianEmpire opened this issue Oct 15, 2024 · 6 comments
Open

Compiling for Windows with Either Cygwin or Visual Studio? #17

PlutonianEmpire opened this issue Oct 15, 2024 · 6 comments

Comments

@PlutonianEmpire
Copy link

When setting up Cygwin or VS to be able to compile the various StarGen versions, what libraries do we need to install for Cygwin/VS to be able to compile StarGen? I lost an SSD cuz I kept uninstalling/re-installing multi-GB libraries trying to find the right libraries and the SSD gave out.

For my own version, I compiled it with Cygwin last year, but StarGen complained of missing dll's, and when I got the missing dll's off the web, StarGen was extremely slow

@sirus20x6
Copy link
Owner

that sounds like a linker issue. I'm actually not sure how to compile in windows. extremely slow sounds normal. especially if you're setting it to only return earth like planets. some day I'd like to make it multithreaded. I'll see if I can get access to a windows computer and get it to compile. windows development is really obnoxious though.

@sirus20x6
Copy link
Owner

it appears it's not just a compiler issue but a standard library issue. the microsoft standard library doesn't have constexpr versions of their math functions. I could write my own, but I think the easiest thing is just to use the preprocessor to remove constexpr for windows builds. I kinda hate this though because it's non-standard, weird, idiosyncratic, and just plain dumb. oh and it means the windows version will be slower

@PlutonianEmpire
Copy link
Author

PlutonianEmpire commented Oct 15, 2024

That's interesting, cuz the last version compiled by Omega13a is faster than the one I compiled, and they're both for Windows

@sirus20x6
Copy link
Owner

I did change some of the planet resonance calculations to be more accurate instead of using a lookup table. it's possible that's causing slowdown. I should work on trying to get performance tracing working again. that would reveal a lot. also there is a lot of dynamic memory usage with dust lanes that can probably be made static that would speed things up a lot

@sirus20x6
Copy link
Owner

I think I fixed the performance issue. it was a partially implemented object pooling function that I commited. I reverted it and it seems to be much better

@ajtribick
Copy link

This also can't be compiled in Clang. Constexpr math functions are mostly a C++26 feature (https://wg21.link/P1383R2), with a limited subset available in C++23 (https://wg21.link/P0533R9). This project specifies C++20. GCC implements this as a non-standard extension since C++11, other compilers do not.

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

3 participants