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

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

Re: Emacs modules 25.1


From: Mambo Levis
Subject: Re: Emacs modules 25.1
Date: Tue, 27 Sep 2016 12:23:08 +0000 (UTC)

Hi,
I found the problem and now I can build the emacs_module example using g++.
That's means that I eventually can create a c++ wrapper, but I would like to 
listen to your advice because I don't knowif there is a fundamental issue that 
I'm ignoring. So, only one question is still open?
1. Is it possible to create a C++ wrapper around emacs_modules and what are the 
implications?


Thanks,
Levis

 

    On Monday, September 26, 2016 8:07 PM, Mambo Levis <address@hidden> wrote:
 

 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]