Opened 8 years ago

Last modified 2 years ago

#4824 new bug

Windows: Dynamic linking doesn't work out-of-the-box

Reported by: Orphi Owned by:
Priority: low Milestone:
Component: Runtime System (Linker) Version: 7.0.1
Keywords: Cc:
Operating System: Windows Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #5620 Differential Rev(s):
Wiki Page:

Description (last modified by simonpj)

I did this:

  1. Download and install GHC 7.0.1
  1. Compile HelloWorld.hs with the "-dynamic" flag.
  1. Run the resulting binary.

When I run the program, I get a dialog box telling me that the program can't find the RTS DLL.

If I move the necessary DLLs to somewhere in the search path, the binary runs just fine. The bug is that the Windows installer for GHC does not do this itself.

(I've classified this bug as "runtime system", but really it's an installer bug, not an RTS bug.)

Related to this are two complications:

  1. The documentation fails to describe how GHC tries to find dynamic libraries on Windows. (Section 4.12.4 of the User Guide only explains how this is done for Unix and Mac OS.)
  1. The DLLs are scattered all over the place. If they were all in one folder, I could just add that to the search path. But they aren't.

Change History (9)

comment:1 Changed 8 years ago by igloo

Milestone: 7.2.1

Thanks for the report.

comment:2 Changed 6 years ago by simonpj

Description: modified (diff)
difficulty: Unknown

See also #5620

comment:3 Changed 6 years ago by igloo

Milestone: 7.4.17.6.1
Priority: normallow

comment:4 Changed 6 years ago by igloo

Milestone: 7.6.17.6.2

comment:5 Changed 4 years ago by thoughtpolice

Milestone: 7.6.27.10.1

Moving to 7.10.1.

comment:6 Changed 3 years ago by thoughtpolice

Milestone: 7.10.17.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:7 Changed 3 years ago by ezyang

Component: Runtime SystemRuntime System (Linker)

comment:8 Changed 3 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:9 Changed 2 years ago by thomie

Milestone: 8.0.1
Note: See TracTickets for help on using tickets.