On Thursday, 18 May 2017 at 07:10:54 UTC, Rainer Schuetze wrote:
You have to add an import path to the folder with dllproj
inside to the project configuration of the exeproject.
If you want to limit the imported code to the declarations, you
can enable "generate interface headers" and add an import path
to these instead.
Sharing data or resources between executable and DLL is
currently limited to separate ownership as each binary contains
its own copy of the runtime. (There is currently work being
done to have a shared runtime, though). You might also run into
other cross module dependencies...
I tried just adding import paths to project and to di files and
although compilation passes I still get link errors like:
error LNK2019: unresolved external symbol
_D10handmade_h10game_input6__initZ (handmade_h.game_input.__init)
referenced in function _D8platform5win324main9myWinMainFPvPvPaiZi
(int platform.win32.main.myWinMain(void*, void*, char*, int))
where game_input is a struct in interface file. I also tried
adding the di file to the exeproject but it still doesn't work.
It seems VisualD doesn't add di files to compiler invocation
arguments like it does with *.d and *.def files.