www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Windows service in D

reply "Gifford Hesketh" <gifford.hesketh savvis.net> writes:
A few months ago, I asked if anyone had an example of a Windows service
written in D.  Not finding one, I wrote one -- although there was one
outstanding issue I wanted to resolve before making it public.

Looking at this again, D's tools changes seem to have broken the
compilation.  Before I make anyone wade through my code, does an error like
the following look familiar to anyone ?

\dm\samples\d\service>dmd -v service.d advapi32.lib
parse     service
semantic  service
semantic2 service
semantic3 service
code      service
generating code for function 'main'
generating code for function 'ServiceMain'
generating code for function 'ServiceCtrlHandler'
\dm\bin\link service,,,advapi32.lib+user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

service.obj(service)
 Error 42: Symbol Undefined __init_6winsvc19SERVICE_TABLE_ENTRY

--- errorlevel 1
May 26 2004
parent "Walter" <newshound digitalmars.com> writes:
If probably means you need to link in the .obj for the module where
SERVICE_TABLE_ENTRY is defined.

"Gifford Hesketh" <gifford.hesketh savvis.net> wrote in message
news:c93ciu$lk8$1 digitaldaemon.com...
 A few months ago, I asked if anyone had an example of a Windows service
 written in D.  Not finding one, I wrote one -- although there was one
 outstanding issue I wanted to resolve before making it public.

 Looking at this again, D's tools changes seem to have broken the
 compilation.  Before I make anyone wade through my code, does an error

 the following look familiar to anyone ?

 \dm\samples\d\service>dmd -v service.d advapi32.lib
 parse     service
 semantic  service
 semantic2 service
 semantic3 service
 code      service
 generating code for function 'main'
 generating code for function 'ServiceMain'
 generating code for function 'ServiceCtrlHandler'
 \dm\bin\link service,,,advapi32.lib+user32+kernel32/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

 service.obj(service)
  Error 42: Symbol Undefined __init_6winsvc19SERVICE_TABLE_ENTRY

 --- errorlevel 1

Jun 09 2004