[asterisk-dev] Compiling a c++ function module

Andre Courchesne courchea at net-forces.com
Wed Sep 15 07:46:04 CDT 2010


Hi all,

  I am attempting to build a function module based on func_volume. However I need to link to a static library and include a header file that c++ syntax (class definition,...). So I attempt to compile my module with g++. 

  I'm working my way through the compile errors (mostly syntax related), but one got me stumped:

func_testfoo.c:81: error: expected primary-expression before ‘.’ token
func_testfoo.c:82: error: expected primary-expression before ‘.’ token

The code segment related is:

/*! \brief Static structure for datastore information */
static const struct ast_datastore_info volume_datastore = {
        .type = "volume",
        .destroy = destroy_callback
};

  Any hints ?

  If anyone as a similar function module skeleton that would compile with g++ I would be grateful.

 Thanks for any hints.

---

Andre Courchesne - Consultant

http://www.net-forces.com

MSN: courchea at net-forces.com

Skype: VoipForces



L'information contenue dans le présent document est la propriété de Andre Courchesne. Et est divulguée en toute confidentialité. Cette information ne doit pas être utilisée, divulguée à d'autres personnes ou reproduite sans le consentement écrit explicite de Andre Courchesne.

The information contained in this document is confidential and property of Andre Courchesne. It shall not be used, disclosed to others or reproduced without the express written consent of Andre Courchesne.








More information about the asterisk-dev mailing list