i’m having an interesting issue arising using meson
-buildsystem on windows
.
i have this simple project setup:
root
- src
- game.cpp
- engine.cpp
- include
- engine.h
- meson.build
with the contents of meson.build being this bare-bones setup:
project('dll_test', 'cpp')
srcdir = 'src'
sources = files('src/engine.cpp')
incdir = include_directories('include')
lib = shared_library('engine',
sources,
include_directories : incdir,
install : true)
executable('game', 'src/game.cpp',
include_directories : incdir,
link_with : lib,
install : false)
it doesn’t get much simpler than this.
the shared_library shouldn’t simply generate a dll file but also generate an import library for the executable to link against. however, it never generates said import library, and it results in an error when trying to compile:
LINK : fatal error LNK1181: cannot open input file 'engine.lib'
ninja: build stopped: subcommand failed.
it would be lovely if some meson
-pro could help me out here, thanks!
random_ab_user is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.