Skip to content

fix(cmake): avoid Windows LNK1149 cortext.lib name collision on the Node addon - #25

Merged
gabewillen merged 1 commit into
mainfrom
fix/win32-node-import-lib-name
Aug 18, 2026
Merged

gabewillen merged 1 commit into
mainfrom
fix/win32-node-import-lib-name

Conversation

@gabewillen

Copy link
Copy Markdown
Contributor

Round 4 of the Windows port for the npm release of @augmem/cortext v1.3.3
(follow-up to PRs #22-#24). Compilation now succeeds; both Windows matrix
jobs fail at link:

LINK : fatal error LNK1149: output filename matches input filename
'.../Release/cortext.lib'

cortext_node is a MODULE with OUTPUT_NAME "cortext" (so the addon is
cortext.node) and it privately links the static cortext library, which
already emits cortext.lib. MSVC also writes an import library named after
OUTPUT_NAME, so input and output are both cortext.lib.

This sets ARCHIVE_OUTPUT_NAME to cortext_node so the unused import library
is cortext_node.lib and no longer collides.

Copilot AI lite review requested due to automatic review settings August 18, 2026 02:02
@gabewillen
gabewillen merged commit 9bddc87 into main Aug 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the CMake configuration for the optional Node.js N-API addon build to prevent an MSVC linker failure caused by the addon’s generated import library name colliding with the already-produced static library name (cortext.lib). This supports the broader Windows port work needed for the @augmem/cortext npm release pipeline.

Changes:

  • Set ARCHIVE_OUTPUT_NAME for cortext_node to cortext_node so the generated import library becomes cortext_node.lib instead of cortext.lib.
  • Set ARCHIVE_OUTPUT_DIRECTORY for cortext_node to align the import library output location with the addon output directory.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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