Skip to content

Add QL_EXPORT patches for Gaussian copula and primitive polynomials#6

Merged
fumitoh merged 1 commit intomainfrom
claude/debug-quantlib-workflow-2hZmV
Feb 22, 2026
Merged

Add QL_EXPORT patches for Gaussian copula and primitive polynomials#6
fumitoh merged 1 commit intomainfrom
claude/debug-quantlib-workflow-2hZmV

Conversation

@fumitoh
Copy link
Member

@fumitoh fumitoh commented Feb 22, 2026

Summary

Extended the QuantLib DLL build script to apply two additional patches for proper symbol export annotations, and improved build logging and error reporting.

Key Changes

  • Added two new export patches to enable DLL builds:

    • Patch 6: gaussiancopulapolicy.hpp - Annotate static const members (density_ and cumulative_) with QL_EXPORT
    • Patch 7: primitivepolynomials.hpp - Annotate extern array (PrimitivePolynomials) with QL_EXPORT and inject qldefines.hpp include if missing
  • Improved build process:

    • Split monolithic build into separate library and test suite targets with individual logging
    • Added per-target build logs (build-library.log, build-testsuite.log) for better diagnostics
    • Enhanced error reporting to display last 80 lines of failed build logs inline
    • Made test suite build conditional on $BuildTests parameter
  • Enhanced CI/CD error diagnostics:

    • Added GitHub Actions step to display build error logs on failure
    • Shows last 100 lines of available build logs for troubleshooting
  • Minor fixes:

    • Updated test executable filter from ql_test_suite.exe to quantlib-test-suite.exe to match actual output name

Implementation Details

The new patches follow the same pattern as existing ones, using PowerShell string replacement to inject QL_EXPORT annotations. The primitivepolynomials.hpp patch includes a check to avoid duplicate includes of qldefines.hpp.

https://claude.ai/code/session_01Pe2NhovoMN1DaU6vjJ1gjj

…ls, improve build diagnostics

- Patch gaussiancopulapolicy.hpp: add QL_EXPORT to private static const
  members (density_, cumulative_) that aren't auto-exported by
  CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
- Patch primitivepolynomials.hpp: add QL_EXPORT to extern
  PrimitivePolynomials array and include qldefines.hpp
- Split CMake build into separate library and test suite targets with
  per-target log capture for better error diagnosis
- Add "Show build errors" CI step to display build logs on failure
- Fix test suite executable name: quantlib-test-suite.exe (not ql_test_suite.exe)

https://claude.ai/code/session_01Pe2NhovoMN1DaU6vjJ1gjj
@fumitoh fumitoh marked this pull request as ready for review February 22, 2026 12:27
@fumitoh fumitoh merged commit 00f2997 into main Feb 22, 2026
2 checks passed
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.

2 participants