all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mambo Levis <mambo.levis@gmail.com>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>,
	 "johnw@newartisans.com" <johnw@newartisans.com>,
	 "bozhidar@batsov.com" <bozhidar@batsov.com>
Subject: Emacs modules 25.1
Date: Mon, 26 Sep 2016 18:07:36 +0000 (UTC)	[thread overview]
Message-ID: <709716874.935191.1474913256978@mail.yahoo.com> (raw)
In-Reply-To: 709716874.935191.1474913256978.ref@mail.yahoo.com

Hi,
I tested (in Windows) the example from Aurélien Aptel (http://diobla.info/blog-archive/modules-tut.html) with gcc at it runs as expected.
Now, I would like to create a C++ wrapper, but I not quite sure if it is possible. Questions:
1. Is it possible to create a C++ wrapper around emacs_modules?2. I am trying to build the same example using g++ and the following error appears:
---------------------------------------------------------------------------------------------------------------$ make SO=dllg++ -ggdb3 -ID:\user\emacs-src\emacs-25-branch-src/src -c mymod.cmymod.c: In function 'int emacs_module_init(emacs_runtime*)':mymod.c:55:45: error: invalid conversion from 'emacs_value_tag* (*)(emacs_env*, int, emacs_value_tag**, void*) {aka emacs_value_tag* (*)(emacs_env_25*, int, emacs_value_tag**, void*)}' to 'emacs_value_tag* (*)(emacs_env*, ptrdiff_t, emacs_value_tag**, void*) {aka emacs_value_tag* (*)(emacs_env_25*, long long int, emacs_value_tag**, void*)}' [-fpermissive]                                         NULL);                                             ^Makefile:42: recipe for target 'mymod.o' failedmake: *** [mymod.o] Error 1
---------------------------------------------------------------------------------------------------------------
It corresponds to the following code (I remarked the part associated with the error)
-------------------------------------------------------------------------------------------------------intemacs_module_init (struct emacs_runtime *ert){  emacs_env *env = ert->get_environment (ert);
  /* create a lambda (returns an emacs_value) */  emacs_value fun = env->make_function (env,                                        0,                                        0,                                        Fmymod_test,                                        "doc",                                        NULL);  bind_function (env, "mymod-test", fun);  provide (env, "mymod");
/* loaded successfully */  return 0;}
-----------------------------------------------------------------------------------------------------------
Do you have any Idea or recommendation? 
Thanks,
Levis




       reply	other threads:[~2016-09-26 18:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <709716874.935191.1474913256978.ref@mail.yahoo.com>
2016-09-26 18:07 ` Mambo Levis [this message]
2016-09-27 12:23   ` Emacs modules 25.1 Mambo Levis
2016-09-27 14:55     ` Eli Zaretskii
2016-09-27 15:36     ` Philipp Stephani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=709716874.935191.1474913256978@mail.yahoo.com \
    --to=mambo.levis@gmail.com \
    --cc=bozhidar@batsov.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=johnw@newartisans.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.