Jon,
You're right, that's the way to do it. I realized that a bit earlier
today and wrote the code for it. Sorry, dumb mistake. I was thinking that I
should do everything in the extension, but instead I create two separate
extensions and just pass a pointer to the objects in scheme. So in shor
Okay. If you want one module to include code from the other, you can
simply include it. If you're worried about multiple definitions of
scheme_initialize, scheme_reload, and scheme_module_name, why wouldn't
you just pull all of the rest of the code -- the common code -- into a
separate file and hav
Hmmm, I haven't had to wrap anything using extern C because all the
function prototypes are in C already I believe (the three I mentioned
above). The main idea here is that I want to reuse my extensions in the
same way that my classes are constructed. I want to write extensions
separately for each
I'm not entirely sure that I follow, but if you're writing these
extension functions in C++, I believe you'll need to wrap their
prototypes in an extern(C) { ... } block so that they'll be given
un-mangled names for the linker to use.
On Thu, Feb 6, 2014 at 4:56 PM, Cody Eilar wrote:
> I understa
I understand that, the issue is that I have to provide three functions that
are not static so that I can make my c++ code known to scheme. Those
functions are:
scheme_reload(Scheme_Env *env)
scheme_initialize(Scheme_Env *env)
scheme_module_name()
Each one of these functions are known to the linke
On Wed, Feb 05, 2014 at 02:16:54PM -1000, Cody Eilar wrote:
> > But what I really want is:
> >
> > Foo_ext.h:
> >
> > func1_racket_ext() { /*... do racket stuff and run func1() */}
> >
> > /* Scheme initializes etc... */
> >
> >
> > Bar_ext.cpp:
> > #include "Foo_ext.h"
> >
> > func2_racket_ext() {
>
>
>
> I asked this same question on the dev side but didn't get any
> response, so I thought this list might be more appropriate. So I have been
> writing some racket extensions for some C++ classes using the tutorial (
> http://docs.racket-lang.org/inside/overview.html) on the racket site
7 matches
Mail list logo