"Eli Zaretskii" <e...@gnu.org> wrote:

What about setting:
  ent->fptr.func_ptr = func;

too?

They are one and the same, since they are members of a union:

 struct function_table_entry
   {
     union {
char *(*func_ptr) (char *output, char **argv, const char *fname);
char *(*alloc_func_ptr) (const char *fname, int argc, char **argv);
     } fptr;

Okay, you're right. I didn't see the "union".

Thanks.  Your problem is here:

  EXPORT int mk_test_gmk_setup (const gmk_floc *flocp)
  {
    gmk_add_function ("hello_world", hello_world, 0, 255, 0);
                        ^^^^^^^^^^^

Make functions cannot have the '_' character in their names, so it
seems.  Here's why:

Ayyy!! > 1 day wasted on such a triffle. May I suggest more warnings
in define_new_function()? It works fine as "$(hello-world "Hello world").

Btw, Gisle, I don't understand why you needed to use the EXPORT
thingy, the DLL is compiled just fine without it, and only exports
non-static variables and functions anyway.

Right again. I was thinking more about making a DLL with MSVC.
(without any .def file).

Thanks again.

--gv

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to