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

Fixes for tools to build on windows (MSVC) #660

Merged
merged 3 commits into from
Oct 16, 2021

Conversation

oyvindln
Copy link
Contributor

@oyvindln oyvindln commented Oct 9, 2021

Variable-length arrays are non-standard, so replaced it with vectors instead. Not sure if it was ideal to use that for arrays that large anyhow. They're currently re-created on every call to those functions which is a bit sub-optimal but not focusing on that right now.

Use std::vector instead of VLA (VLA is non-standard C++, gcc has it as an extension, MSVC does not)
Add define so M_PI is defined
Specify linking to qwt on windows (may need to fix naming if we ever want to compile with mingw)
(Only actual change was removing a non-standard preprocessor directive unavailable on MSVC)
@oyvindln
Copy link
Contributor Author

oyvindln commented Oct 9, 2021

WIth this the tools now build with MSVC on windows. I haven't ran the tests etc yet though, need to add some stuff to bundle dlls and/or build statically. Running ld-analyse from qt creator and opening tbcs seems to work with no issues at least.

What I did to build was to install MS build tools 2019 for the compiler, Qt for qt creator, and
vcpkg. Then use vcpkg to install fftw and qwt (which installs the rest of Qt) like so:

.\vcpkg.exe install fftw3:x64-windows
.\vcpkg.exe install qwt:x64-windows

Then create a new Qt kit with qmake from vcpkg in qt creator, and add this:

LIB+=D:\prog\vcpkg\installed\x64-windows\lib```
To "environment" under the kit options to make it find the libraries and include files.

After this it builds fine in Qt Creator provided the right kit is selected in project options and release mode is used (debug probably works fine too but installing qt took via vcpkg took hours since it has to compile it so only tested release.)

@oyvindln
Copy link
Contributor Author

btw the removal of the GPL header from some of the EZPWD source files was from upstream, no idea why they did that but it's still GPL.

@atsampson atsampson merged commit 46b4f2a into happycube:master Oct 16, 2021
@oyvindln oyvindln deleted the upstream2 branch December 19, 2021 22:33
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

Successfully merging this pull request may close these issues.

None yet

2 participants