ocaml / ocaml/flexdll

flexdll does not give the -L flag to MSVC link.exe

Open
#145 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
OCaml
Stars
115
Forks
34
PR merge metrics
No merged PRs in 30d

Description

Original issue: https://github.com/dbuenzli/tsdl/issues/96#issuecomment-2438579933

The relevant snippet:

+ flexlink -x64 -merge-manifest -stack 33554432 -g -o src\dlltsdl_stubs.dll SDL2d.lib src/tsdl_stubs.obj    -LY:/source/tsdl/_opam/share/dkcoder-c/debug/lib/pkgconfig/../../lib -LC:/Users/beckf/AppData/Local/Programs/DKMLNA~1/lib/ocaml\flexdll

+ link -lib -nologo -machine:AMD64 -out:src\libtsdl_stubs.lib  SDL2d.lib src/tsdl_stubs.obj

shows that flexlink ... -Lxyz does not get translated to link ... /LIBPATH:xyz (https://learn.microsoft.com/en-us/cpp/build/reference/libpath-additional-libpath?view=msvc-170).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating flexlink's handling of -L arguments and the code that assembles the MSVC link command shown in the issue. Reproduce the Windows command if possible and trace how SDL2d.lib and the object file are passed to link.exe. Done means each flexlink -Lxyz argument is represented as /LIBPATH:xyz for MSVC.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.