On Wed, Feb 22, 2012 at 20:22, Tristan Zajonc <[email protected]> wrote:
> Hi,
>
> Is there a trick to implementing modules in header libraries, to help with
> reuse across modules. I don't know the ins and outs of node modules but I
> tried to port:
>
> https://github.com/kkaefer/node-cpp-modules/tree/master/06_objects
>
> to put the implementation in the header library as follows:
>
> https://gist.github.com/1886636
>
> This compiles fine but I get a "Error: Unable to load shared library" when
> requiring it. If I leave the implementation in C++ it works fine. Simple
> bug?
class MyObject : public node::ObjectWrap {
public:
static v8::Persistent<v8::FunctionTemplate> constructor;
You define but don't declare the constructor field. It needs to be
declared outside the class definition.
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en