How to use user defined function in THttpServer for control

When I use THttpServer in standalone application, I defined a function like void NextEvent() and use THttpServer::RegisterCommand("/NextEvent","NextEvent()") to use it in web page.

But I get error like: use of undeclared identifier ‘NextEvent’, so what’s the correct way to do it, thanks for any help or comment.

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Hi Xin,

I am adding @linev in the loop. Perhaps can you add a reproducer for the issue, your platform, ROOT’s version, and the exact error?

Cheers,
D

Hi,

Are you building application yourself?
In such case you need to create dictionary and add function NextEvent() to LinkDef.h file.
Something like:

#pragma link C++ function NextEvent;

See discussion here for some more details.

Regards,
Sergey