Menu

Problem compiling my first handler

Jjackdan
2007-11-24
2013-05-15
  • Jjackdan

    Jjackdan - 2007-11-24

    Hi everyone,

    Firstly, I apologize if this might seem obvious to other people, but I'm fairly new at C++, and even more at this module thing.

    I managed to install mod_cplusplus on Ubuntu.  I then tried to compile the first little example: "What does a handler look like?" on the page http://modcplusplus.sourceforge.net/

    Unfortunately it's not working.  Here's what I'm trying to do:

    > g++ -c -I/usr/local/include -I/usr/include/apache2 -I/usr/include/apr-1.0 -Wall testhandler.cpp -o ./testhandler.o
    testhandler.cpp: In constructor ‘TestHandler::TestHandler()’:
    testhandler.cpp:6: error: no matching function for call to ‘ApacheHandler::ApacheHandler()’
    /usr/local/include/apache_handler.h:55: note: candidates are: ApacheHandler::ApacheHandler(ApacheServerRec*)
    /usr/local/include/apache_handler.h:50: note:                 ApacheHandler::ApacheHandler(const ApacheHandler&)

    I really don't get what's happening. Line 6 is the declaration/implementation of the constructor:  TestHandler(void) { };

    Could anyone help me with this?

    Thanks for your time,

    Jjackdan

     
    • John K. Sterling

      you should only have a constructor taking in a server rec - void is not allowed.  See the handler checked into the example directory.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.