How to setup DLL and EXE projects in one VS solution
    Igor via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Wed May 17 09:56:13 PDT 2017
    
    
  
At the moment I have:
EXEProject:
   app.d - it does loadlibrary of dllproj and uses data structures 
defined in dllproj.d (it imports dllproj). On the file system 
this file is under <solutiondir>/platform/win32/ and is defined 
as module win32.app;
DLLProject
   dllproj.d - exports functions and contains data structures 
those function use. On file system this file is under 
<solutiondir>/source and is defined as module dllproj;
EXEProject depends on DLLProject. DLL project compiles and builds 
DLL fine but, of course EXE project breaks with an error:
module dllproj is in file dllproj.d which cannot be read.
I could just copy all the structs from dllproj.d to app.d and 
remove the import and I guess it would all work but there has to 
be a better way to structure code so structs are only written in 
one place?
    
    
More information about the Digitalmars-d-learn
mailing list