-1

Development Envinronment:

  • OS: Windows 8
  • IDE: Visual Studio 2010
  • Boost Version: 1.55.0

I have a simple application which writes string to a file. Since I have to run the application as windows service, i'm using windows service api such as StartServiceCtrlDispatcher, RegisterServiceCtrlHandler etc. Everything works good in this way and life is good. But when I include boost header in the code I have problem starting the service from net start command. I'm including this

#include <boost/filesystem.hpp>

This is the error I'm getting

C:\WINDOWS\system32>net start aab
The service is not responding to the control function.

More help is available by typing NET HELPMSG 2186. 

I'm using sc create aab binpath="path to executable" to create the service.

I dont' know how in the world boost is intefering and don't know how to debug it or find the solution.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Pritesh Acharya
  • 1,596
  • 5
  • 15
  • 36

1 Answers1

0

Appears to have little to do with the use of boost.

binpath="" seems odd. How can you expect the service to launch, if there's no binary?

Also, if this is actually ok in your real testing,

  • check dll dependencies (dependencywalker.com)
sehe
  • 374,641
  • 47
  • 450
  • 633
  • sorry for confusion. I have path to executable inside that quote. edited my question. – Pritesh Acharya Jul 22 '14 at 08:44
  • What /is/ the path to the executable? Is it into program files (check Application Virtualization interfering because you're running the service under a different account). Is it into a network location (check execution permissions). Also, the rest of my answer still applies, regardless of the path (I didn't _assume_ that it was empty, as I mentioned in the answer) – sehe Jul 22 '14 at 08:47
  • it's inside my local drive and not inside program file or network location. The exe actually works fine if I don't include boost header(but i'm not using the boost anywhere in my code) – Pritesh Acharya Jul 22 '14 at 08:49
  • 1
    This means that you're indeed missing the proper dlls (e.g. boost_filesystem-vc120-gd-1_55.dll, etc). – sehe Jul 22 '14 at 08:50
  • please put that as answer – Pritesh Acharya Sep 16 '14 at 08:48