Totally Lost Trying to Use DWin
Benji Smith
dlanguage at benjismith.net
Sun Aug 10 23:50:14 PDT 2008
I'm trying to use the DWin Registry module in my code, and I'm pretty
stumped just trying to figure out the steps.
I'm using DMD 1.33 on Windows XP SP3, with Tango 0.99.7 and DWin 0.38.
I'm building with DSSS 0.75.
I've followed the instructions here ( http://dsource.org/projects/dwin )
to build the DWin library, and now I've got a file sitting here called
"C:\dmd\dwin.lib" and I have no idea what to do with it.
I tried directly copying the example code from the Registry module, but
it won't compile:
regtest.d:
---------------------------------------------------------------
module regtest;
import dwin.sys.win32.Registry;
import tango.io.Stdout;
import tango.text.convert.Sprint;
void main()
{
char[] result;
scope httpkey =
RegistryKey.classesRoot.openSubKey(r"HTTP\shell\open\command");
if(httpkey !is null)
{
result = httpkey.getValue!(char[])(null);
Stdout(result).newline;
//"C:\Program Files\Internet Explorer\iexplore.exe" -nohome
}
else
Stdout("failed").newline;
}
dsss.conf:
---------------------------------------------------------------
name = regtest
[regtest.d]
target = regtest
But when I run "dsss build", I get the following error:
regtest.d => regtest
+ D:\Development\d\libs\dsss\bin\rebuild.exe -Idsss_imports\ -I. -S.\
-ID:\Development\d\libs\dsss\include\d -SD:\Development\d\libs\dsss\lib\
-ID:\Development\d\libs\dsss\include\d
-SD:\Development\d\libs\dsss\lib -oqdsss_objs\D regtest.d -ofregtest
regtest.d(3): module Registry cannot read file 'dwin\sys\win32\Registry.d'
Command D:\Development\d\libs\dsss\bin\rebuild.exe returned with code 1,
aborting.
Error: Command failed, aborting.
So... why can't it read 'dwin\sys\win32\Registry.d'? It it a compiler
error or a DSSS error?
As a longtime java programmer, I know how to set the classpath to tell
the java compiler or JVM where to find libraries. But I don't know how
to tell the DMD or DSSS. I assumed that building the DWin library (in a
subdirectory of DMD, of all places!) would immediately make it available.
But I'm completely clueless and need some guidance.
Thanks!
--benji
More information about the Digitalmars-d-learn
mailing list