Closed Cleaf-y closed 7 months ago
More insights into compiling pyekfmm in Windows are very welcome.
Please feel free to reach out to me.
Also, some hints about connecting to Github user "Cleaf-y" are very helpful for me to gain more experience in Windows compilation.
-Yangkang
On Sat, Mar 9, 2024 at 11:49 PM Cleaf-y @.***> wrote:
This pull request addresses a compilation issue encountered when building the project on Windows 11 x64 23H2 using MSVC 143. The problem stemmed from the M_PI macro being undeclared in the eikonal.c file, which led to compilation failures. Changes Made:
- Added a conditional macro definition for M_PI in eikonal.c. This ensures that M_PI is defined if it's not already provided by the environment or the included headers, specifically targeting compatibility with the MSVC compiler on Windows platforms.
Rationale:
The MSVC compiler, unlike some other compilers, does not define M_PI by default. This lack of definition caused build failures on Windows. By adding a conditional definition, we ensure broader compatibility and a smoother build process on Windows systems, especially for those using MSVC. Testing:
The modifications have been tested on a Windows 11 x64 23H2 system with MSVC 143 as the build tool. After applying these changes, the project builds successfully without any M_PI related errors.
This contribution aims to enhance the project's portability and ease of build on Windows platforms, potentially benefiting other Windows users who may face similar compilation issues.
You can view, comment on, or merge this pull request online at:
https://github.com/aaspip/pyekfmm/pull/5 Commit Summary
- 6605c0c https://github.com/aaspip/pyekfmm/pull/5/commits/6605c0cddb0ff941bb0eae854f9c25abf6edc252 Update eikonal.c
- a5c0902 https://github.com/aaspip/pyekfmm/pull/5/commits/a5c0902c3a50603d331b9e5a4641c02cfd7278e6 Update eikonalvti.c
File Changes
(2 files https://github.com/aaspip/pyekfmm/pull/5/files)
- M pyekfmm/src/eikonal.c https://github.com/aaspip/pyekfmm/pull/5/files#diff-fdf89afc8801abcdf4512a02ad0666955be739ec6032e9f14924826e6438e8e7 (1)
- M pyekfmm/src/eikonalvti.c https://github.com/aaspip/pyekfmm/pull/5/files#diff-b8832de33f24ebe0f00cef8e3c69f4f0e7f6643d053c60dd028d52cb1e9453e8 (1)
Patch Links:
— Reply to this email directly, view it on GitHub https://github.com/aaspip/pyekfmm/pull/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHCWEWK776W3TYLJ53WBATYXPQ33AVCNFSM6AAAAABEOVCYA2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE3TONJSGQ2TANQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
This pull request addresses a compilation issue encountered when building the project on Windows 11 x64 23H2 using MSVC 143. The problem stemmed from the
M_PI
macro being undeclared in theeikonal.c
file, which led to compilation failures.Changes Made:
M_PI
ineikonal.c
. This ensures thatM_PI
is defined if it's not already provided by the environment or the included headers, specifically targeting compatibility with the MSVC compiler on Windows platforms.Rationale:
The MSVC compiler, unlike some other compilers, does not define
M_PI
by default. This lack of definition caused build failures on Windows. By adding a conditional definition, we ensure broader compatibility and a smoother build process on Windows systems, especially for those using MSVC.Testing:
The modifications have been tested on a Windows 11 x64 23H2 system with MSVC 143 as the build tool. After applying these changes, the project builds successfully without any
M_PI
related errors.This contribution aims to enhance the project's portability and ease of build on Windows platforms, potentially benefiting other Windows users who may face similar compilation issues.