Skip to content

set of windows (mingw64) build fixes #3090

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

Merged
merged 3 commits into from
Jun 12, 2025

Conversation

w0lek
Copy link
Contributor

@w0lek w0lek commented May 27, 2025

There are a couple compilation fixes for mingw64 build

Description

Two kind of changes:

  1. removed unused function
char* getline(char*& _lineptr, FILE* _stream)

This function has compilation issue and is not actually used and looks obsolete.
If removing is not an option, i will think how to correct code without removing it.

  1. #define _USE_MATH_DEFINES for _WIN32 platform to ensure (non-standard) value of M_PI is brought in from math.h

Related Issue

#3076

Motivation and Context

Allows to build application on windows platform using mingw64

How Has This Been Tested?

It was tested as a part of hotfixes for a several releases in Aurora package (windows build)

Types of changes

  • Compilation errors
  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@w0lek w0lek requested review from amin1377 and soheilshahrouz May 27, 2025 18:31
@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code libvtrutil external_libs labels May 27, 2025
Copy link
Contributor

@AmirhosseinPoolad AmirhosseinPoolad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @w0lek. regarding the getline function, even if it wasn't unused I fully support removing it. Seems like a relic from the old C days.

Other than that I had a suggestion on a way to avoid ifdefs for windows compatibility.

Copy link
Contributor

@vaughnbetz vaughnbetz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest just using std::math::pi instead of bringing in the _USE_MATH_DEFINES

@w0lek w0lek marked this pull request as ready for review June 12, 2025 13:20
@w0lek
Copy link
Contributor Author

w0lek commented Jun 12, 2025

Suggest just using std::math::pi instead of bringing in the _USE_MATH_DEFINES

done

Copy link
Contributor

@AlexandreSinger AlexandreSinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AlexandreSinger AlexandreSinger merged commit c709753 into verilog-to-routing:master Jun 12, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external_libs lang-cpp C/C++ code libvtrutil VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants