Skip to content

Projects setting "-dynamic" don't play well with the extension #434

Closed
@LeventErkok

Description

@LeventErkok

I've a project that I have to compile as a dynamically loaded library, i.e., with GHC's -dynamic flag.

Unfortunately, this doesn't do well with VSCode. I see the following printed in the "PROBLEMS" tab:

Program error: 
    Cannot load -dynamic objects when GHC is built the normal way
    To fix this, either:
      (1) Use -fexternal-interpreter, or
      (2) Build the program twice: once the normal way, and then
          with -dynamic using -osuf to set a different object file suffix.

Is there a known workaround for this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    can-workaroundcomponent: ghcidetype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions