Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build 'Hello World' example on Windows with Stack #198

Open
mpilgrem opened this issue Feb 24, 2024 · 0 comments
Open

Build 'Hello World' example on Windows with Stack #198

mpilgrem opened this issue Feb 24, 2024 · 0 comments

Comments

@mpilgrem
Copy link

mpilgrem commented Feb 24, 2024

This is not an issue as such, but to record for the benefit of other users that I was able to build the 'Hello World' example on Windows 11 with EDIT: a modified version of Stack 2.15.1 the master branch version of Stack (post-Stack 2.15.1), as follows:

A Stack configuration:

snapshot: lts-22.11 # GHC 9.6.4
extra-deps:
# Release v2.2.0
- git: https://github.com/haskell-game/dear-imgui.hs.git
  commit: bab4d769eaacba2de5da342e853f18746db0e12c
- megaparsec-9.2.2@sha256:c306a135ec25d91d252032c6128f03598a00e87ea12fcf5fc4878fdffc75c768,3219
flags:
  dear-imgui:
    sdl: true
    opengl3: true

A package.yaml:

name: imGuiHelloWorld
version: 0.1.0.0
dependencies:
- base >= 4.7 && < 5
- dear-imgui
- gl
- managed
- sdl2
executables:
  imguiHelloWorld:
    main: Main.hs
    source-dirs: app
    ghc-options:
    - -threaded
    - -rtsopts
    - -with-rtsopts=-N

I needed also needed to install with stack exec -- pacman (SDL versions after 2.24.1-1 do not work):

-S mingw-w64-x86_64-pkgconf
-U mingw-w64-x86_64-SDL2-2.24.1-1-any.pkg.tar.zst # From archive at https://repo.msys2.org/mingw/mingw64/
-S mingw-w64-x86_64-glew

EDIT: Stack 2.15.1/pantry-9.3.2 does not appear to handle an extra-dep with submodules. That is being investigated at commercialhaskell/stack#5536. That has been fixed in the master branch version of Stack (if you are not using GHCup to manage versions of Stack, stack upgrade --source-only --git).

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

No branches or pull requests

1 participant