help-gnucap
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnucap] Plugins developpment


From: romain . gailleton
Subject: [Help-gnucap] Plugins developpment
Date: Mon, 21 Jan 2013 17:16:53 +0100
User-agent: Roundcube Webmail/0.8.4

hey guys,

I've been trying to do some plugins following this link : http://www.gnucap.org/dokuwiki/doku.php?id=gnucap:manual:tech:plugins:coding

I'm compiling for windows, using Code::Blocks and MinGW.

I had to do some minor tweaks to the code and I came up with this :

fake_function.h :
class FAKE_FUNCTION {
public:
  virtual std::string  eval(double arg)const = 0;
};


fake_function.cpp :
#include <iostream>
#include <cmath>
#include <string>
#include "fake_function.h"
#include "l_lib.h"
#include "globals.h"

const std::string abc ("aba");

class ABAS : public FAKE_FUNCTION {
public:
  std::string eval(double arg)const
  {
    return to_string(std::abs(arg));
  }
}p;

DISPATCHER<FUNCTION>::INSTALL d_absurd(&function_dispatcher, abc, &p);

It compiles the dll without the last line (DISPATCHER<FUN.....)

but with this line in I have this error :

fake_function.cpp:18: error: no matching function for call to 'DISPATCHER<FUNCTION>::INSTALL::INSTALL(DISPATCHER<FUNCTION>*, const std::string&, ABAS*)' l_dispatcher.h:177: note: candidates are: DISPATCHER<T>::INSTALL::INSTALL(DISPATCHER<T>*, const std::string&, T*) [with T = FUNCTION] l_dispatcher.h:171: note: DISPATCHER<FUNCTION>::INSTALL::INSTALL(const DISPATCHER<FUNCTION>::INSTALL&)

would it be becuse ABAS is a FAKE_FUNCTION instead of a FUNCTION ?

Do you guys can help me solve this (... not really a gnucap error i think) issue ?

Thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]