On 2013-11-14 23:44, Thomas Mayer wrote:
Hello,
I am currently documenting and refactoring the code of PuREST JSON to be consistent, but I seem to be unable to rename setup function from setup_json0x2dencode to json_encode_setup, as after renaming, I get the following error:
error: load_object: Symbol "setup_json0x2dencode" not found json-encode error: ... couldn't create
i'm not sure what you want to acchieve. it seems that you are creating an object [json-encode], which (since it is not loaded yet) will make Pd look for a file named "json-encode.dll" and once it found it, it will look in the dll for an entry function named "setup_json0x2dencode".
Pd will *not* look for the function "json_encode_setup()". Pd uses the library name to calculate the setup function name; a library "foo" must provide a setup-function "foo_setup()". a library with weird characters, like "foo-bar" must provide a setup-function "setup_foo0x2dbar()". there is no way to tell Pd that it should use "foo_setup()" for the library "foo-bar".
so if you do want to use the new setup-function you must: - rename the resulting dll to "json_encode" - use [json_encode] in the patch.
void json_encode_setup(void) { json_encode_class = class_new(gensym("json-encode"),
so which name do you want: "json-encode" (as the class-name suggests) or "json_encode" as the setup-function name suggests?
gfmdsar IOhannes