help-gnu-emacs
[Top][All Lists]
Advanced

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

Emacs modules 25.1


From: Mambo Levis
Subject: Emacs modules 25.1
Date: Mon, 26 Sep 2016 18:07:36 +0000 (UTC)

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 via email to

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